Need to rebundle if we switch the Gemfile for postgres

This commit is contained in:
Sarah Mei 2011-09-03 21:52:57 -07:00
parent 7c24a1a1fb
commit bf954f3e6a

View file

@ -2,9 +2,10 @@
echo $DB
ruby -e "system('cp config/ci/Gemfile.postgresql Gemfile') if ENV['DB'] == 'postgres'"
# Remove Gemfile.lock and rebundle on Ruby 1.9
# Remove Gemfile.lock if we're on Ruby 1.9
ruby -e "system('rm Gemfile.lock') if RUBY_VERSION.include?('1.9')"
ruby -e "system('bundle install --without development production') if RUBY_VERSION.include?('1.9')"
# Re-bundle if we're on Ruby 1.9 or postgres
ruby -e "system('bundle install --without development production') if RUBY_VERSION.include?('1.9') || ENV['DB'] == 'postgres'"
# Create a database.yml for the right database
cp config/database.yml.example config/database.yml