Defect #7516
closedRedmine does not work with RubyGems 1.5.0
100%
Description
RubyGems 1.5.0 was released yesterday.
I attempted to install Redmine 1.1.1 using RVM, Ruby 1.8.7p330 and Rails 2.3.5.
rake db:migrate
failed with the following error message:
rake aborted! undefined local variable or method `version_requirements' for #<Rails::GemDependency:0xb7351b0c>
Here's the relevant Rails ticket:
https://rails.lighthouseapp.com/projects/8994/tickets/4026-rubygems-136-warning-in-rails-235
Related issues
Updated by Anonymous almost 14 years ago
I have the exact same issue - can I somehow use an older ruby gems version or is there some other work around to get the redmine update until this is fixed?
Updated by Oto Brglez almost 14 years ago
I have the same problem. Redmine 1.1, Rails 2.3.5, Ruby 1.8.7, RubyGems 1.5.0.
Perhaps work around is to downgrade RubyGems?
Updated by Oto Brglez almost 14 years ago
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
Updated by Andrew Vit almost 14 years ago
Confirmed that this hack fixes the problem. Would it make sense to check this into the codebase for the time being, until the updates for rails 2.3.latest are resolved?
Updated by Jose Torres almost 14 years ago
This problem persists through Ruby-gems 1.5.2 with latest git commit:
https://github.com/edavis10/redmine/commit/824adaf30c55695c08ebd5456923ba573344b3e9
atomic redmine # RAILS_ENV=production rake db:migrate (in /var/www/redmine) rake aborted! undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x7f1bdb0f24d8> (See full trace by running task with --trace) atomic redmine # RAILS_ENV=production rake db:migrate --trace (in /var/www/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x7f6f5ec058a8> /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:in `requirement' /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:254:in `activate' /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:1204:in `gem' /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:73:in `add_load_paths' /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths' /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `each' /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths' /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:132:in `process' /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send' /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' /var/www/redmine/config/environment.rb:20 /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' /usr/local/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4 /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/lib64/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain' /usr/lib64/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:8:in `load' /usr/bin/rake:8 atomic redmine #
Updated by Jean-Baptiste Barth almost 14 years ago
- Target version set to 1.2.0
With trunk updated to Rails 2.3.11, I upgraded my rubygems to 1.5.2 and everything works fine. Does anybody still have issues with current trunk, or can we close this issue ?
Updated by moto kawasaki almost 14 years ago
Could you please back-port to redmine-1.1.1, or should I use 1.2.0 or current?
thank you very much!
Updated by Jose Torres almost 14 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
This error has been resolved with rails upgraded to 2.3.11. Thanks Jean-Baptise Barth.
Updated by Jean-Baptiste Barth almost 14 years ago
- Status changed from Resolved to Closed
- Resolution set to Fixed
@moto: you'll have to wait 1.2.0 unless you're working with trunk. 1.2.0 should be released in about 2 months, not that far from now :) If you can't wait, you can try Oto's patch.
Jose Diaz-Gonzalez: no problem, we should thank Jean-Philippe for that though.
I close the issue, please re-open if you have problems with rubygems 1.5+ on trunk or after 1.2.0 release.
Updated by Alex Q over 13 years ago
Jean-Baptiste Barth wrote:
With trunk updated to Rails 2.3.11, I upgraded my rubygems to 1.5.2 and everything works fine. Does anybody still have issues with current trunk, or can we close this issue ?
I still I've this issue
Opensuse11.4 x86_64
/srv/www/htdocs/redmine # rpm -qa |grep ruby
rubygem-rake-0.8.7-8.4.x86_64
rubygem-activerecord-2_3-2.3.11-1.2.4.x86_64
rubygems-1.5.2-22.1.x86_64
ruby-1.8.7.p334-1.2.2.x86_64
rubygem-rack-1.1.0-7.4.x86_64
rubygem-activeresource-2_3-2.3.11-1.2.4.x86_64
rubygem-actionpack-2_3-2.3.11-1.2.4.x86_64
rubygem-rails-2_3-2.3.11-1.2.1.x86_64
ruby-devel-1.8.7.p334-1.2.2.x86_64
rubygem-activesupport-2_3-2.3.11-1.2.4.x86_64
rubygem-actionmailer-2_3-2.3.11-1.2.4.x86_64
/srv/www/htdocs/redmine # rpm -qa |grep gem
rubygem-rake-0.8.7-8.4.x86_64
rubygem-activerecord-2_3-2.3.11-1.2.4.x86_64
rubygems-1.5.2-22.1.x86_64
rubygem-rack-1.1.0-7.4.x86_64
rubygem-activeresource-2_3-2.3.11-1.2.4.x86_64
rubygem-actionpack-2_3-2.3.11-1.2.4.x86_64
rubygem-rails-2_3-2.3.11-1.2.1.x86_64
rubygem-activesupport-2_3-2.3.11-1.2.4.x86_64
rubygem-actionmailer-2_3-2.3.11-1.2.4.x86_64
gem list
- LOCAL GEMS ***
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
i18n (0.4.2)
rack (1.1.0)
rails (2.3.11)
rake (0.8.7)
My error:
/srv/www/htdocs/redmine # RAILS_ENV=production rake db:migrate --trace(in /srv/www/htdocs/redmine)
- Invoke db:migrate (first_time)
- Invoke environment (first_time)
- Execute environment
rake aborted!
undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x7f75411a2490>
/srv/www/htdocs/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:in `requirement'
/usr/lib64/ruby/vendor_ruby/1.8/rubygems.rb:254:in `activate'
/usr/lib64/ruby/vendor_ruby/1.8/rubygems.rb:1204:in `gem'
/srv/www/htdocs/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:73:in `add_load_paths'
/srv/www/htdocs/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
/srv/www/htdocs/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `each'
/srv/www/htdocs/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
/srv/www/htdocs/redmine/config/../vendor/rails/railties/lib/initializer.rb:132:in `process'
/srv/www/htdocs/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/srv/www/htdocs/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/srv/www/htdocs/redmine/config/environment.rb:20
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:29:in `require'
/srv/www/htdocs/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/srv/www/htdocs/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/srv/www/htdocs/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/srv/www/htdocs/redmine/vendor/rails/railties/lib/tasks/misc.rake:4
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib64/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib64/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Updated by Evgeny Seliverstov over 13 years ago
- Status changed from Closed to Reopened
Doesn't work for me with trunk (r5798), rails 2.3.11, rubygems 1.8.2, RedCloth (4.0.4, 3.0.4).
It is very similar to #8325.
Failed with rake db:migrate
and rake gems
tasks:
$ rake gems RAILS_ENV=production --trace ** Invoke gems (first_time) ** Invoke gems:base (first_time) ** Execute gems:base ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `name' for "RedCloth":String /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/rails/gem_dependency.rb:277:in `==' /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:217:in `===' /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:217:in `matching_specs' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `find_all' /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:403:in `each' /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:402:in `each' /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:216:in `find_all' /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:216:in `matching_specs' /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:238:in `to_specs' /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec' /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:1182:in `gem' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/rails/gem_dependency.rb:75:in `add_load_paths' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/initializer.rb:301:in `add_gem_load_paths' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/initializer.rb:301:in `each' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/initializer.rb:301:in `add_gem_load_paths' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/initializer.rb:132:in `process' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `send' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `run' /usr/local/www/redmine/config/environment.rb:20 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' /usr/local/www/.gem/ruby/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require' /usr/local/www/.gem/ruby/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in `new_constants_in' /usr/local/www/.gem/ruby/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/tasks/misc.rake:4 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/local/www/.gem/ruby/1.8/gems/rails-2.3.11/lib/tasks/gems.rake:17 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/local/www/.gem/ruby/1.8/bin/rake:19:in `load' /usr/local/www/.gem/ruby/1.8/bin/rake:19
Updated by Branson Matheson over 13 years ago
I too am having the same problem with the same setup. This is a piece of Rails 2.x code on a newly built osx platform:
- rails (2.3.11, 2.3.8)
- RedCloth (4.2.7, 4.0.2)
- rake (0.8.7)
I tried the code above. . no joy.
Updated by Etienne Massip over 13 years ago
Related RubyGems bug tracker entry is here.
Updated by Jean-Philippe Lang over 13 years ago
- Status changed from Reopened to Closed
Closing this ticket since the problem was about rubygems 1.5.0, not 1.8.