JRuby

Can't install camping as a gem

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 0.9.1
  • Fix Version/s: JRuby 0.9.1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

I've tried to install camping following Ola Bini's tutorial, but when executing:

$ jruby $JRUBY_HOME/bin/gem install camping --no-ri --no-rdoc --include-dependencies

I get:

Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (NoMethodError)
undefined method `rubygems_version' for 0.9.7:Gem::Version

This is using SVN revision 2232. Using 0.9.0 I get a slightly different error message but still no installation:

ERROR: While executing gem ... (NoMethodError)
undefined method `version_requirements' for #<Gem::Specification name=rdf-redland version=0.5>

Activity

Hide
Tim Azzopardi added a comment -
 
C:\dev\jruby\antbuilder>gem list --remote AntBuilder

*** REMOTE GEMS ***
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (NoMethodError)
    undefined method `name' for 4.4.1:Gem::Version

C:\dev\jruby\antbuilder>gem list --remote AntBuilder

*** REMOTE GEMS ***
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (NoMethodError)
    undefined method `version_requirements' for #<Gem::Specification name=syndication version=0.4.0>

C:\dev\jruby\antbuilder>gem list --remote AntBuilder 
Show
Tim Azzopardi added a comment -
 
C:\dev\jruby\antbuilder>gem list --remote AntBuilder

*** REMOTE GEMS ***
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (NoMethodError)
    undefined method `name' for 4.4.1:Gem::Version

C:\dev\jruby\antbuilder>gem list --remote AntBuilder

*** REMOTE GEMS ***
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (NoMethodError)
    undefined method `version_requirements' for #<Gem::Specification name=syndication version=0.4.0>

C:\dev\jruby\antbuilder>gem list --remote AntBuilder 
Hide
Tim Azzopardi added a comment -

Basically if you keep trying the problem goes away, usually the second time, but in this case, the third time.

Show
Tim Azzopardi added a comment - Basically if you keep trying the problem goes away, usually the second time, but in this case, the third time.
Hide
Tim Azzopardi added a comment -

Charles said on mailing list: "Ola and I were talking and thought it would be worth hooking this
particular error and running an install/uninstall cycle until it
happens again, so we can get a decent trace. My theory is that it's
something in RubyGems or in a core library that makes assumptions
about how the interpreter works. Since it's intermittent, signs point
toward threading, where we're quite a bit different from Ruby because
of our unpredictable scheduler (whatever the OS provides). Ruby would
see issues infrequently because their scheduler is more
predictable...but not 100% predictable. "

Show
Tim Azzopardi added a comment - Charles said on mailing list: "Ola and I were talking and thought it would be worth hooking this particular error and running an install/uninstall cycle until it happens again, so we can get a decent trace. My theory is that it's something in RubyGems or in a core library that makes assumptions about how the interpreter works. Since it's intermittent, signs point toward threading, where we're quite a bit different from Ruby because of our unpredictable scheduler (whatever the OS provides). Ruby would see issues infrequently because their scheduler is more predictable...but not 100% predictable. "
Hide
Tim Azzopardi added a comment -

This could well be a general ruby/gem bug: google for

"ERROR: While executing gem ... (NoMethodError)

and you get 850 results

Typical example is :

http://www.vmunix.com/mark/blog/archives/2006/04/08/ruby-gems-still-doesnt-work-on-104/

which shows the same symptoms.

Show
Tim Azzopardi added a comment - This could well be a general ruby/gem bug: google for "ERROR: While executing gem ... (NoMethodError) and you get 850 results Typical example is : http://www.vmunix.com/mark/blog/archives/2006/04/08/ruby-gems-still-doesnt-work-on-104/ which shows the same symptoms.
Hide
Michael Studman added a comment -

Attaching patch that replicates rubygems fix for this problem.

I've had to extend the rubygems solution a small amount because otherwise we get some further errors (100% of the time) due to some flakey gemspecs out in the wild interracting with our divergent marshalling behaviour and the hash / equals methods of certain gem objects.

Specifics of the problem (from email to mailing list):
1) The rubygems fix (by Jim and co.) stops the old problem of random TypeErrors by introducing more rigorous hash and equals methods.
2) JRuby marshall code causes various rubygems objects to have their hash and equals methods called quite a bit more often than MRI does (hash in particular). Typical hash bucket stuff, I expect.
3) Because hash and equals are implemented more rigorously it's turning up some problems in one or two gems out in the wild that have flakey gem specs (null values or values with the wrong type etc).
4) JRuby chokes on these gems in a gem bulk update every time because of #2.

Show
Michael Studman added a comment - Attaching patch that replicates rubygems fix for this problem. I've had to extend the rubygems solution a small amount because otherwise we get some further errors (100% of the time) due to some flakey gemspecs out in the wild interracting with our divergent marshalling behaviour and the hash / equals methods of certain gem objects. Specifics of the problem (from email to mailing list): 1) The rubygems fix (by Jim and co.) stops the old problem of random TypeErrors by introducing more rigorous hash and equals methods. 2) JRuby marshall code causes various rubygems objects to have their hash and equals methods called quite a bit more often than MRI does (hash in particular). Typical hash bucket stuff, I expect. 3) Because hash and equals are implemented more rigorously it's turning up some problems in one or two gems out in the wild that have flakey gem specs (null values or values with the wrong type etc). 4) JRuby chokes on these gems in a gem bulk update every time because of #2.
Hide
Charles Oliver Nutter added a comment -

So this is an odd situation: we're committing a change based on what will be in the next RubyGems release, but we don't have that release to include with 0.9.1. However since it technically is fixed with this patch in our dist, we'll mark it as fixed now. It's a standing item to keep up-to-date with RubyGems, so we'll just cover that as its own task.

Show
Charles Oliver Nutter added a comment - So this is an odd situation: we're committing a change based on what will be in the next RubyGems release, but we don't have that release to include with 0.9.1. However since it technically is fixed with this patch in our dist, we'll mark it as fixed now. It's a standing item to keep up-to-date with RubyGems, so we'll just cover that as its own task.
Hide
Charles Oliver Nutter added a comment -

Closing 0.9.1 resolved issues.

Show
Charles Oliver Nutter added a comment - Closing 0.9.1 resolved issues.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: