Bugs item #26892, was opened at 2009-08-07 12:16
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26892&group_id=126

Category: `gem install` command (extensions)
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Jake Douglas (yakischloba)
Assigned to: Nobody (None)
Summary: Gem::Ext::RakeBuilder can't execute Rake on JRuby if Rake gem isn't 
installed

Initial Comment:
On JRuby, when installing a gem that has 'extensions = "Rakefile"' as part of 
it's specification, Gem::Ext::RakeBuilder tries to run 'jrake' which does not 
exist in JRuby. This occurs when the actual Rake gem is not installed. This can 
be worked around by requiring the rake gem as a dependency, but the desired 
behavior would be for it to find the rake that is bundled with JRuby.

This line, in the "1.8" compatible rubygems, is the culprit:

cmd = ENV['rake'] || "#{Gem.ruby} -rubygems #{Gem.bin_path('rake')}" rescue 
Gem.default_exec_format % 'rake'


In the "1.9" rubygems, its like this:

cmd = ENV['rake'] || 'rake'

which probably wouldn't work either unless JRuby is the default Ruby or the 
JRuby rake points it to the jruby executable.

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

Comment By: Ryan Davis (zenspider)
Date: 2010-11-12 14:46

Message:
This ticket has been deemed stale and we're closing it in order to catch up 
with our ticket list. If you think it is still valid, please reopen.

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

Comment By: James Tucker (raggi)
Date: 2009-08-21 01:20

Message:
This is a problem because of inconsistent policy. I strongly recommend 
"wontfix" until this is actually sat down and thought about some more.

Gem.default_exec_format should really be the default so that we don't clobber 
multiple interpreters all the time. As more *applications* are available in the 
ruby space, this will become more common on open source platforms where apps 
are installed by package manager.

The special casing of system and random selection of executable names under 
jruby makes it extremely hard to get this right in all situations, and the 
above at least attempts to make it work when things are installed by gem, which 
is the highest level of reliability I can guarantee at this time.

Falling back to 'rake' on platforms where it is going to launch MRI has very 
strange impacts.

I would love to have a non-bikeshed discussion with everyone involved on this 
topic - that includes Charlie, Eric, myself and if we can get it, Matz. The 
only reason I would like matz to chime in, is that this is also related to the 
bundling of rake, and the lack of correct binary prefix and postfix discovery 
in the main MRI packages.

What we cannot do is keep making changes that fix one specific side of the 
problem, otherwise this will never go away. I also suspect that someone is 
going to have to suck it up and suffer a change, in order to reach consistency. 
Sadly I feel it is likely this will be the jruby project, and whilst I don't 
want to force that on them, I would like them to present some kind of 
reasonable alternative if they have one. I do not believe special casing system 
more will solve this issue.

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26892&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to