Project

General

Profile

db:migratation doesnt' work - undefined version_requirements

Added by Josef S. over 13 years ago

Hello,

today I started to install Redmine for my company on a windows server 2008 R2 64bit system.
But there is a problem by the following step:

cd C:\webserver\Redmine
set RAILS_ENV=production
rake generate_session_store
rake db:migrate

If I start the command "rake db:migrate" I get the following error:

undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x49a4ae0>

I tried to solve this problem with the suggestions in the thread: [http://www.redmine.org/issues/7516] So I also tried to install rails in version 2.3.11, but my problem is still there.

Here are the current installed versions:

actionmailer (2.3.11, 2.3.5)
actionpack (2.3.11, 2.3.5)
activerecord (2.3.11, 2.3.5)
activeresource (2.3.11, 2.3.5)
activesupport (2.3.11, 2.3.5)
cgi_multipart_eof_fix (2.5.0)
gem_plugin (0.2.3)
i18n (0.4.2)
mongrel (1.1.5 x86-mingw32)
mongrel_service (0.3.4 i386-mswin32)
mysql (2.8.1 x86-mingw32)
rack (1.1.0, 1.0.1)
rails (2.3.11)
rake (0.8.7)
rubygems-update (1.4.2)
win32-service (0.5.2 mswin32)

gem -v
1.5.3

What can I do to solve this problem?

Best Regards, Beppo


Replies (8)

RE: db:migratation doesnt' work - undefined version_requirements - Added by Felix Schäfer over 13 years ago

What Redmine version are you trying to install?

RE: db:migratation doesnt' work - undefined version_requirements - Added by Josef S. over 13 years ago

Here are a few more information:

ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]
undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x4a74290>
c:/Program Files (x86)/Redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:in `requirement'
C:/Program Files (x86)/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:254:in `activate'
C:/Program Files (x86)/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:1204:in `gem'
c:/Program Files (x86)/Redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:73:in `add_load_paths'
c:/Program Files (x86)/Redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
c:/Program Files (x86)/Redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `each'
c:/Program Files (x86)/Redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
c:/Program Files (x86)/Redmine/config/../vendor/rails/railties/lib/initializer.rb:132:in `process'
c:/Program Files (x86)/Redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
c:/Program Files (x86)/Redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
c:/Program Files (x86)/Redmine/config/environment.rb:20
C:/Program Files (x86)/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
C:/Program Files (x86)/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
c:/Program Files (x86)/Redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
c:/Program Files (x86)/Redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
c:/Program Files (x86)/Redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
c:/Program Files (x86)/Redmine/vendor/rails/railties/lib/tasks/misc.rake:4
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
C:/Program Files (x86)/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
C:/Program Files (x86)/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Program Files (x86)/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Program Files (x86)/Ruby187/bin/rake:19:in `load'
C:/Program Files (x86)/Ruby187/bin/rake:19

Best regards, Beppo

RE: db:migratation doesnt' work - undefined version_requirements - Added by Josef S. over 13 years ago

I try to install Latest stable release: 1.1.1 (2011-01-30).

Best regards, Beppo

RE: db:migratation doesnt' work - undefined version_requirements - Added by Felix Schäfer over 13 years ago

Josef S. wrote:

I try to install Latest stable release: 1.1.1 (2011-01-30).

That version isn't compatible with rails 2.3.11 yet and requires a rubygems version prior to 1.5 to work. You will probably need to downgrade rubygems. The solutions discussed in #7516 all apply to trunk and not stable as far as I can see.

RE: db:migratation doesnt' work - undefined version_requirements - Added by Josef S. over 13 years ago

Thank you very much for your answer.

Is it besser to install all the things new or can I easy uninstall rubygems 1.5.3 and install I version < 1.5? If I can do that it with uninstall and install rubygems, how can I uninstall rubygems?

I was a little confused, because I only installed the rubyinstaller-1.8.7-p334.exe and I got both Ruby and RubyGems.

Best regards, Beppo

RE: db:migratation doesnt' work - undefined version_requirements - Added by Felix Schäfer over 13 years ago

Mmh, I don't know ruby on windows, but maybe try something like gem update --system 1.4.2. If that doesn't work, you'll have to ask google I afraid.

RE: db:migratation doesnt' work - undefined version_requirements - Added by Artem Konoplin over 13 years ago

I have the same problem on latest redmine (1.1.1). Resolved it by installing rubygems version 1.4.2 (you can get it here: http://rubyforge.org/frs/shownotes.php?release_id=45397).
After unpack tgz or zip file install them by command: ruby setup.rb

RE: db:migratation doesnt' work - undefined version_requirements - Added by Josef S. over 13 years ago

Thank you very much for your answers.

Now it works with the tip from Artem.

Best regards, Beppo

    (1-8/8)