rake aborted! undefined local variable or method 'version_requirements' for #<Rails::GemDependency:0x4348980

Added by Sean Thomas almost 9 years ago

Hi,

I'm trying to install Redmine for the first time in a Windows Server 2008 environment. I'm getting the following error when I try to run the following rake command:

setRAILS_ENV=production
rake db:migrate

error: "rake aborted! undefined local variable or method 'version_requirements' for #<Rails::GemDependency:0x4348980"

I tried to run the command in the redmine-1.1.2\app\ directory.

Would someone mind pointing the way for me here?

Regards,

Sean

Replies (9)

RE: rake aborted! undefined local variable or method 'version_requirements' for #<Rails::GemDependency:0x4348980 - Added by Ivan Cenov almost 9 years ago

Sean Thomas wrote:

setRAILS_ENV=production

Omitted space after 'set'?
set RAILS_ENV=production

RE: rake aborted! undefined local variable or method 'version_requirements' for #<Rails::GemDependency:0x4348980 - Added by Sean Thomas almost 9 years ago

no sorry, I just typed that in wrong earlier. The error happens when actually executing: rake db:migrate.

I'm completely new to Ruby here! :)

RE: rake aborted! undefined local variable or method 'version_requirements' for #<Rails::GemDependency:0x4348980 - Added by Sean Thomas almost 9 years ago

Here are the versions that I installed before getting this error:

gem install rails -v=2.3.5
gem install rack -v=1.0.1
gem install -v=1.4.2 i18n

RE: rake aborted! undefined local variable or method 'version_requirements' for #<Rails::GemDependency:0x4348980 - Added by Tiago Bem over 8 years ago

I had that problem to, im trying to intall redmine 1.1.2 on win server 2008 and i get that error to. i solved the problem with this hack:
"
Phillip Koebbe from Ruby on Rails suggested inserting following code between bootstrap and initialize section of enviroment.rb. And it works.

if Gem::VERSION >= "1.3.6"
module Rails
class GemDependency
def requirement
r = super
(r == Gem::Requirement.default) ? nil : r
end
end
end
end
"
comments doesn't let me insert the link...
regards.

RE: rake aborted! undefined local variable or method 'version_requirements' for #<Rails::GemDependency:0x4348980 - Added by 七 七 over 8 years ago

run the following commands can resolve it:
$ gem install rubygems-update -v='1.4.2'
$ gem uninstall rubygems-update -v='1.5.0'
$ update_rubygems

RE: rake aborted! undefined local variable or method 'version_requirements' for #<Rails::GemDependency:0x4348980 - Added by ed boel almost 8 years ago

thank you, that last thing fixed for me the migration from redmine-1.2.1 to redmine-1.3.0 (with the new rails update)

Works - Added by arthur me almost 8 years ago

七 七's fix works for me as well on OSX and standard MySQL

(1-9/9)