diff --git a/Vagrantfile b/Vagrantfile index 1cb76cb..890158e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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 diff --git a/script/setup.sh b/script/setup.sh index 51fb6a0..8b6518f 100755 --- a/script/setup.sh +++ b/script/setup.sh @@ -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