Rails and rake db:migrate in Production Mode

There are some inconsistencies when running rails server, rails console and rake db:migrate in production mode. There really should be a standard way to let the rails and rake commands know you want to execute them in production mode.

Starting Rails Server in Production Mode

rails server -e production 
OR
rails s -e production

Starting Rails Console in Production Mode

rails console production
OR
rails c production

rake db:migrate in Production Mode

rake db:migrate RAILS_ENV=production
VN:F [1.9.22_1171]
Rating: 3.6/5 (7 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Rails and rake db:migrate in Production Mode, 3.6 out of 5 based on 7 ratings
Facebook Twitter Email

Leave a Reply