Defect #11248

rake aborted! uninitialized constant RAILS_ENV trying to update Database

Added by Alessio Pollero over 5 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:Cant reproduce Affected version:

Description

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)

Why ?

How can i solve this error ? my database is postgreSQL...

History

#1 Updated by Jean-Philippe Lang over 5 years ago

  • Resolution set to Cant reproduce

#2 Updated by Alessio Pollero over 5 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 ?

Thanks.

#3 Updated by Ki Won Kim over 5 years ago

I have same error and evironments.
and I remove plugins folder, then ok.
Maybe old plugins were effected.

#4 Updated by CĂ©lestin Matte about 5 years ago

Hi.
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).

Regards

#5 Updated by Jean-Baptiste Barth over 4 years ago

  • Status changed from New to Closed
  • Priority changed from Urgent to Normal
Closing this issue, I hope it's now resolved for you. Just a few points :
  • 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

Thanks

Also available in: Atom PDF