Fix vagrant postgreslq encoding

This commit is contained in:
Rei
2014-03-04 17:16:17 +08:00
parent 93665c6426
commit 00f737beb1
3 changed files with 10 additions and 2 deletions

5
.gitignore vendored
View File

@@ -23,5 +23,8 @@
# Ignore uploads.
/public/uploads
# Ingore Vagrant config.
# Ignore Vagrant config.
/.vagrant
# Ignore deploy config.
/config/deploy

3
Vagrantfile vendored
View File

@@ -27,6 +27,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
dev.vm.provision :shell, path: 'bin/setup.sh', args: '/vagrant', privileged: false
end
# Fix postgresql default encoding
config.vm.provision 'shell', inline: 'update-locale LC_ALL="en_US.utf8"'
config.vm.define 'web' do |web|
web.vm.network :private_network, ip: '192.168.33.11'

View File

@@ -16,7 +16,6 @@ sudo service elasticsearch start
cd -
sudo su postgres -c "createuser -d -R -S `whoami`"
sudo su postgres -c "createdb campo_production -O `whoami`"
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
@@ -28,3 +27,6 @@ bundle install
cp config/database.example.yml config/database.yml
cp config/secrets.example.yml config/secrets.yml
cp config/config.example.yml config/config.yml
rake db:create db:migrate
rails s