Project

General

Profile

Actions

Defect #11248

closed

rake aborted! uninitialized constant RAILS_ENV trying to update Database

Added by Alessio Pollero almost 12 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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...

Actions #1

Updated by Jean-Philippe Lang almost 12 years ago

  • Resolution set to Cant reproduce
Actions #2

Updated by Alessio Pollero over 11 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.

Actions #3

Updated by Ki Won Kim over 11 years ago

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

Actions #4

Updated by Célestin Matte over 11 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

Actions #5

Updated by Jean-Baptiste Barth almost 11 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

Actions

Also available in: Atom PDF