Search code examples
ruby-on-rails-3.1rails-migrations

rake db:migrate does not working


I am updgrading a redmine instance from a very early version. I am doing exact what the tutorial says. However command rake db:migrate rails_env=production doesn't modify the database correctly. There are a lot of fields not added to tables. I checked out the schema.rb file and it looks fine. The command ran without any error. I can tell from the output there are a lot of new indexes generated. I did a db:schema:load and didn't work either. How can I migrate the data? I think I have two options. 1. do a real db:migrate 2. create a fresh new version database and load data from old database, need instruction too

Any advise is appreciated.


Solution

  • RAILS_ENV=production must be in upper case. Credit to Vivek Parihar.