diff options
-rw-r--r-- | lib/tasks/dev_setup.rake | 2 | ||||
-rwxr-xr-x | script/setup | 11 | ||||
-rw-r--r-- | vagrant/bootstrap.sh | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/lib/tasks/dev_setup.rake b/lib/tasks/dev_setup.rake index 73e0b01..7042710 100644 --- a/lib/tasks/dev_setup.rake +++ b/lib/tasks/dev_setup.rake @@ -10,5 +10,5 @@ namespace :dev do end desc "Setup local environment for development." - task :setup => [ 'config_refinery', 'config_db', 'db:setup' ] + task :setup => [ 'config_refinery', 'config_db', 'db:setup', 'db:seed' ] end diff --git a/script/setup b/script/setup index 7823f40..9ddd50b 100755 --- a/script/setup +++ b/script/setup @@ -1,4 +1,13 @@ -#!/bin/bash +#!/usr/bin/env bash +ruby_status=$(rbenv version |& awk '{ printf $4 " " $5 " " $6 }'|sed -r 's/[ ]+$//') +echo \"${ruby_status}\" +if [[ "${ruby_status}" == "is not installed" ]] +then + rbenv install $(cat .ruby-version) + gem install bundler + bundle config build.sqlite3 --with-sqlite3-dir=/usr/local +fi + bundle install --without=production if [ $? ]; then diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index 22e8f3c..8b3fad2 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -7,4 +7,4 @@ echo 'eval "$(rbenv init -)"' >> /home/vagrant/.bash_profile chsh -s /usr/local/bin/bash vagrant service postgresql initdb -service -R +service postgresql start |