rake aborted! uninitialized constant RAILS_ENV trying to update Database
|Resolution:||Cant reproduce||Affected version:|
I'm trying to update redmine from 1.3.0 to 2.0.3 when i arrive at step 4 Update the Database i run this command :
rake db:migrate RAILS_ENV=production
i get this error :
(in /usr/share/redmine) /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils.rb:9: warning: already initialized constant RUBY /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils.rb:86: warning: already initialized constant LN_SUPPORTED rake aborted! uninitialized constant RAILS_ENV (See full trace by running task with --trace)
How can i solve this error ? my database is postgreSQL...
#2 Updated by Alessio Pollero about 6 years ago
I have the problem on my installation rather then simply setting the issue as not reproducible, you could have asked for more information ...
Do you need more information to investigate the problem ?
I have updated from version 1.3.0 and i followed the steps in the upgrade guide, but i get the error ... Should i upgrade to 1.4.4 and then to 2.0.3 ?
#4 Updated by Célestin Matte almost 6 years ago
I had the same problem trying to install a plugin for Redmine 1.x on Redmine 2.x.
The problem may come from one of your plugins, try checking running the db migration with --trace to see where the error comes from.
I solved the problem simply by changing "RAILS_ENV" to "Rails.env" where the error came from (in my case, in plugins/<plugin_name>/init.rb:4).
#5 Updated by Jean-Baptiste Barth over 5 years ago
- Status changed from New to Closed
- Priority changed from Urgent to Normal
- there's no need to upgrade to 1.4.x before 2.x
- there are high chances it's related to one of your plugins that's not compatible with Redmine 2.x
- if the issue still occurs without any plugin, please read SubmittingBugs and provide detailed informations about how to reproduce