blob: fef1365a42fad7440afd3692af2e795fd2619a26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/tpope/rbenv-ctags.git ~/.rbenv/plugins/rbenv-ctags
git clone https://github.com/rkh/rbenv-update.git ~/.rbenv/plugins/rbenv-update
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rbenv update
rbenv install 2.4.2
rbenv global 2.4.2
gem install bundler --no-ri --no-rdoc
rbenv rehash
cd /vagrant
bundle install -j 4 --path vendor/bundle
rbenv rehash
if [ ! -f config/database.yml ]; then
ln -s config/database.yml.vagrant config/database.yml
fi
if [ ! -f .env ]; then
ln -s .env.example .env
fi
createdb
bundle exec rake db:create db:migrate db:seed
RAILS_ENV=test bundle exec rake db:create db:migrate db:seed
|