fix vagrant locale

This commit is contained in:
Rei
2014-04-25 18:12:35 +08:00
parent 6428c72746
commit 0b4d443d6d
2 changed files with 7 additions and 10 deletions

11
Vagrantfile vendored
View File

@@ -5,16 +5,17 @@
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.box = "ubuntu/precise64"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
# NFS required
config.vm.network :private_network, ip: '192.168.33.10'
# Use NFS for performance
config.vm.synced_folder '.', '/vagrant', type: 'nfs'
# Fix postgresql default encoding
config.vm.provision "shell", inline: <<-EOF
update-locale LC_ALL="en_US.utf8"
LC_ALL=en_US.UTF-8
EOF
end

View File

@@ -3,10 +3,6 @@
USER=`whoami`
APP_ROOT=/var/www/campo
# Fix postgresql default encoding
sudo update-locale LC_ALL="en_US.utf8"
export LC_ALL=en_US.UTF-8
sudo apt-get update
# Install system packages
@@ -43,7 +39,7 @@ cp config/database.example.yml config/database.yml
cp config/secrets.example.yml config/secrets.yml
cp config/config.example.yml config/config.yml
bundle install
bundle exec rake db:create:all
bundle exec rake db:create:all db:setup
# Production environment
sudo mkdir -p $APP_ROOT