rake migrate in production environment

May 27, 2009 at 9:57 am (tasks) (, , , )

This is the code in the command line to run the database migrations in Production environment, infact any defined environment in database.yml

rake db:migrate RAILS_ENV=”name_of_the_environment”
Keep in mind that, the file called name_of_the_environment.rb should already be available in config/environments.rb

This can be just a copy of the existing files like config/development.rb

Permalink Leave a Comment