Gems built with (rubygems 1.5.0 / ruby 1.9.2) do not install properly with (1.5.0 / 1.8.7)
Below is a typical scenario, the problematic attribute seems to be autorequire, which is !!null in metadata.
% gem --version
1.5.0
% gem build foo.gemspec
Successfully built RubyGem
Name: foo
Version: 1.0.0
File: foo-1.0.0.gem
% gem install foo-1.0.0.gem
Foo successfully installed!
Successfully installed foo-1.0.0
1 gem installed
% rvm use 1.8.7
Using /Users/blambeau/.rvm/gems/ruby-1.8.7-p330
% gem --version
1.5.0
% gem install foo-1.0.0.gem
ruby_code case not handled: YAML::PrivateType
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/specification.rb:1069:in `ruby_code'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/specification.rb:782:in `to_ruby'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/specification.rb:776:in `each'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/specification.rb:776:in `to_ruby'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/installer.rb:232:in `write_spec'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/installer.rb:172:in `install'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:284:in `install'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:254:in `each'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:254:in `install'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:120:in `execute'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `each'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `invoke'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:133:in `process_args'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103:in `run'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63:in `run'
/Users/blambeau/.rvm/rubies/ruby-1.8.7-p330/bin/gem:25
ERROR: While executing gem ... (Gem::Exception)
ruby_code case not handled: YAML::PrivateType
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Luis Lavena on 03 Feb, 2011 01:50 PM
Please provide the contents of foo.gemspec, as gemspec are serialized
to YAML and adding something there that is not meant to be supported
by Gem::Specification generates this error.
3 Posted by blambeau on 03 Feb, 2011 02:08 PM
I've tried to keep the simplest .gemspec that looks natural to me. It is in attachement.
Support Staff 4 Posted by Luis Lavena on 03 Feb, 2011 02:22 PM
Well, seems you're correct, it is clear that the metadata generated by 1.9.2 is not properly loaded by 1.8.7.
I noticed the following differences:
https://gist.github.com/809520
But can't determine all the details.
Support Staff 5 Posted by Luis Lavena on 03 Feb, 2011 02:25 PM
Please report this to RubyGems bug tracker so the developers can keep track of it:
http://rubyforge.org/tracker/?atid=575&group_id=126&func=br...
6 Posted by travis on 09 Feb, 2011 03:23 AM
It's also the other way around it looks like. Gems built with rubygems < 1.5.0 won't install with 1.5.0. It shows this error:
7 Posted by travis on 09 Feb, 2011 06:58 AM
Actually, I'm getting issues all over the place now after upgrading to 1.5.0.
Seeing this on one particular gem that is trying to update:
Bundler also fails with the same undefined class/module.
8 Posted by Kristian Mandrup on 09 Feb, 2011 01:47 PM
I can't install any of my own gems since upgrading to Rubygems 1.5.0 :(
gem install pkg/roles_generic-0.3.7.3.gem
ERROR: While executing gem ... (ArgumentError)
And same using jeweler 1.5.2
** Execute install Executing "ruby -S gem install ./pkg/roles_generic-0.3.7.3.gem":
ruby -S gem install ./pkg/roles_generic-0.3.7.3.gem
ERROR: While executing gem ... (ArgumentError)
rake aborted!
Command failed with status (1): [ruby -S gem install ./pkg/roles_generic-0....]
/Users/kristianconsult/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:995:in
block in sh' /Users/kristianconsult/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:1010:incall' /Users/kristianconsult/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:1010:insh' /Users/kristianconsult/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:1094:insh' /Users/kristianconsult/.rvm/gems/ruby-1.9.2-p136/gems/jeweler-1.5.2/lib/jeweler/commands/install_gem.rb:14:inrun' /Users/kristianconsult/.rvm/gems/ruby-1.9.2-p136/gems/jeweler-1.5.2/lib/jeweler.rb:92:ininstall_gem'Support Staff 9 Posted by Luis Lavena on 09 Feb, 2011 01:59 PM
This has already been fixed in RubyGems, but still things need to be wrapped for 1.5.1 release:
https://github.com/rubygems/rubygems/commit/6a896f356ef325d0357051f...
Luis Lavena closed this discussion on 09 Feb, 2011 01:59 PM.
travis re-opened this discussion on 09 Feb, 2011 07:07 PM
10 Posted by travis on 09 Feb, 2011 07:07 PM
Any idea what the timeframe is for a 1.5.1 release?
Support Staff 11 Posted by Luis Lavena on 23 May, 2011 09:46 PM
Hello travis,
I believe RubyGems >= 1.6.x already provided the fixes you required.
Please let us know if that is not the case, but I can mention that gems generated with RubyGems 1.8.x can be safely installed by RubyGems 1.3.5 inclusive.
Going to close this in a few days if we don't hear from you.
Thank you.
12 Posted by travis on 23 May, 2011 09:49 PM
Ya, haven't seen this recently.
Support Staff 13 Posted by Luis Lavena on 24 May, 2011 02:26 PM
Great, thank you. Closing this out.
Luis Lavena closed this discussion on 24 May, 2011 02:26 PM.