Skip to content

Instantly share code, notes, and snippets.

@woods
Created May 25, 2010 21:45
Show Gist options
  • Save woods/413733 to your computer and use it in GitHub Desktop.
Save woods/413733 to your computer and use it in GitHub Desktop.
#!/bin/sh
# A short script to bring the production database up to date. You need to
# run this from the application root, e.g.:
#
# ./script/update_production_database
# Display commands as we execute them.
set -x
# Exit immediately if any command fails.
set -e
# Tell jruby to use the RubyGems embedded in this application.
export GEM_HOME=`pwd`/gems/gems
# Run the "migrate" and "seed" tasks using the embedded version of jruby.
java -jar ./lib/jruby-complete-1.5.0.jar -S rake db:migrate db:seed RAILS_ENV=production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment