[Rubygems-developers] [ rubygems-Bugs-27868 ] rubygems 1.3.6 isn't compatible with rails 2.2.2

noreply at rubyforge.org noreply at rubyforge.org
Tue Apr 6 07:41:58 EDT 2010


Bugs item #27868, was opened at 2010-02-22 14:08
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27868&group_id=126

Category: other
Group: v1.3.x
Status: Open
Resolution: Accepted
Priority: 3
Submitted By: Wei Jen Lu (weijenlu)
Assigned to: Eric Hodel (drbrain)
Summary: rubygems 1.3.6 isn't compatible with rails 2.2.2

Initial Comment:
I updated rubygems to 1.3.6 and run my app which using rails 2.2.2. My app has exception: 

/Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/gem_dependency.rb:224:in `specification': undefined method `version_requirements=' for #<Gem::Dependency:0x24d2fe0> (NoMethodError)
        from /Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `plugins'
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `inject'
        from /Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `each'
        from /Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `inject'
        from /Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `plugins'
        from /Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:63:in `locate_plugins'
        from /Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:62:in `map'
        from /Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:62:in `locate_plugins'
         ... 34 levels...
        from /Users/weijen/.gem/ruby/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
        from script/server:3

If I rollback to 1.3.5, then everything is fine.

Please help me. thanks.

My platform:

OS: Mac OS X 10.5.8
Ruby:  ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]

Wei Jen

----------------------------------------------------------------------

Comment By: David Gaya (myelocyte)
Date: 2010-04-06 13:41

Message:
I had the same problem. 
I had two gems with :version specified (will_paginate and rubyist-aasm). I simply removed the version dependence.

<  config.gem 'rubyist-aasm', :version => '~> 2.0.2', :lib => 'aasm', :source => "http://gems.github.com"
>  config.gem 'rubyist-aasm', :lib => 'aasm', :source => "http://gems.github.com"
<  config.gem 'will_paginate', :version => '~> 2.3.11', :source => 'http://gemcutter.org'
>  config.gem 'will_paginate'

----------------------------------------------------------------------

Comment By: Martin Fencl (arta)
Date: 2010-03-22 00:11

Message:
I am facing a similar problem, getting this error when running ar_sendmail: 

➜ ~/.c (master)⚡ $ ar_sendmail
Unhandled exception undefined method `version_requirements=' for #<Gem::Dependency:0x1014355d8>(NoMethodError):
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/gem_dependency.rb:224:in `specification'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `plugins'
	/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `inject'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `each'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `inject'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `plugins'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:63:in `locate_plugins'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:62:in `map'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:62:in `locate_plugins'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:27:in `all_plugins'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:22:in `plugins'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:45:in `add_plugin_load_paths'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:269:in `add_plugin_load_paths'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:135:in `process'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send'
	/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run'
	./config/environment.rb:19
	/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
	/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	/usr/local/lib/ruby/gems/1.8/gems/adzap-ar_mailer-2.1.6/lib/action_mailer/ar_sendmail.rb:252:in `process_args'
	/usr/local/lib/ruby/gems/1.8/gems/adzap-ar_mailer-2.1.6/lib/action_mailer/ar_sendmail.rb:250:in `chdir'
	/usr/local/lib/ruby/gems/1.8/gems/adzap-ar_mailer-2.1.6/lib/action_mailer/ar_sendmail.rb:250:in `process_args'
	/usr/local/lib/ruby/gems/1.8/gems/adzap-ar_mailer-2.1.6/lib/action_mailer/ar_sendmail.rb:269:in `run'
	/usr/local/lib/ruby/gems/1.8/gems/adzap-ar_mailer-2.1.6/bin/ar_sendmail:5
	/usr/local/bin/ar_sendmail:19:in `load'
	/usr/local/bin/ar_sendmail:19

Rolling back to rubygems 1.3.5 doesn't help, gemcutter is installed ....

My setup: OSX SL, Ruby 1.8.7p174, Rails 2.2.2.

I didn't have any issues with ar_sendmail before.
Thanks for any help,
martin

----------------------------------------------------------------------

Comment By: Thong Kuah (kuahyeow)
Date: 2010-03-21 22:06

Message:
I had the exact same problem where version_requirement= was broken. After getting rubygems trunk, I now get a deprecation warning "Gem::Dependency#version_requirements= is deprecated and will be removed on or after August 2010.  Use Gem::Dependency.new".

So that seems to have fixed it.

----------------------------------------------------------------------

Comment By: Robert Berger (rberger)
Date: 2010-03-05 10:29

Message:
Eric: I svn checked out trunk, and from the top dir of the checkout did 
sudo ruby setup.rb 

and then I did a ./script/console from within my 2.2.2 app and it looks like it fixes this problem. I now get a deprecated warning. It looks like the rake commands work in general.

----------------------------------------------------------------------

Comment By: Dylan Fogarty-MacDonald (dylanfm)
Date: 2010-02-25 03:51

Message:
I'm experiencing the exact same issue. 

Rubygems 1.3.6
Ruby 1.8.6 (2008-08-08 patchlevel 286) [x86_64-linux]

----------------------------------------------------------------------

Comment By: Wei Jen Lu (weijenlu)
Date: 2010-02-24 09:19

Message:
I found out this issue is caused by gemcutter be removed.

For my system, I use authlogic 1.3.8 and it depend on gemcutter 0.3.0. When I 
update rubygems, the update process removed gemcutter, then this problem 
happened.

I fixed this problem after reinstall gemcutter.

----------------------------------------------------------------------

Comment By: Eric Hodel (drbrain)
Date: 2010-02-24 08:03

Message:
I think I have this fixed in trunk, but I can't replicate it with an empty rails 2.2.2 app.  Can one of you test it out?

Check out RubyGems then run:

ruby -I/path/to/rubygems/lib script/server

or:

ruby -I/path/to/rubygems/lib -S rake

----------------------------------------------------------------------

Comment By: Florent Vaucelle (florent)
Date: 2010-02-23 11:44

Message:
Hi,
having the same issue on Fedora 9 with REE 1.8.7, rails 2.2.2 installed.


undefined method `version_requirements=' for #<Gem::Dependency:0x9017238>
../vendor/rails/railties/lib/rails/gem_dependency.rb:224:in `specification'
../vendor/rails/railties/lib/rails/plugin/locator.rb:81:in `plugins'
/opt/ruby-ee-1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `inject'
../vendor/rails/railties/lib/rails/plugin/locator.rb:81:in `each'
../vendor/rails/railties/lib/rails/plugin/locator.rb:81:in `inject'
../vendor/rails/railties/lib/rails/plugin/locator.rb:81:in `plugins'
../vendor/rails/railties/lib/rails/plugin/loader.rb:63:in `locate_plugins'
../vendor/rails/railties/lib/rails/plugin/loader.rb:62:in `map'
../vendor/rails/railties/lib/rails/plugin/loader.rb:62:in `locate_plugins'
../vendor/rails/railties/lib/rails/plugin/loader.rb:27:in `all_plugins'
../vendor/rails/railties/lib/rails/plugin/loader.rb:22:in `plugins'
../vendor/rails/railties/lib/rails/plugin/loader.rb:45:in `add_plugin_load_paths'
../vendor/rails/railties/lib/initializer.rb:269:in `add_plugin_load_paths'
../vendor/rails/railties/lib/initializer.rb:135:in `process'
../vendor/rails/railties/lib/initializer.rb:112:in `send'
../vendor/rails/railties/lib/initializer.rb:112:in `run'
environment.rb:13
/opt/ruby-ee-1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/opt/ruby-ee-1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
vendor/rails/railties/lib/tasks/misc.rake:3
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/opt/ruby-ee-1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/opt/ruby-ee-1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/opt/ruby-ee-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/opt/ruby-ee-1.8.7/bin/rake:19:in `load'
/opt/ruby-ee-1.8.7/bin/rake:19

----------------------------------------------------------------------

Comment By: Charles Ju (charlesju)
Date: 2010-02-23 03:50

Message:
I just updated to rubygems 1.3.6 and my app is on rails 2.2.2. My platform is OSX 10.6.2 and ruby at ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0].

1.3.5 is fine

undefined method `version_requirements=' for <Gem::Dependency type=:runtime name="json" requirements=">= 0">:Gem::Dependency
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/gem_dependency.rb:224:in `specification'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `plugins'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `inject'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `inject'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:81:in `plugins'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:63:in `locate_plugins'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:62:in `map'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:62:in `locate_plugins'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:27:in `all_plugins'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:22:in `plugins'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:45:in `add_plugin_load_paths'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:269:in `add_plugin_load_paths'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:135:in `process'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run'
/Users/charlesju/work/SyncManager/config/environment.rb:16
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'

Charles

----------------------------------------------------------------------

Comment By: Daniel Berger (djberg96)
Date: 2010-02-23 03:04

Message:
Time to vendor in rubygems? Can that be done?

Dan

----------------------------------------------------------------------

Comment By: Vidal Graupera (vgraupera)
Date: 2010-02-23 02:40

Message:
I hit the exact same problem. 

My platform is OS X 10.6.2 and ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]




----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27868&group_id=126


More information about the Rubygems-developers mailing list