[Rubygems-developers] [ rubygems-Bugs-27995 ] Gem.default_exec_format does not work with IronRuby

noreply at rubyforge.org noreply at rubyforge.org
Tue Mar 23 03:19:59 EDT 2010


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

Category: None
Group: None
Status: Open
Resolution: None
>Priority: 4
Submitted By: Shri Borde (shrib)
Assigned to: Nobody (None)
Summary: Gem.default_exec_format does not work with IronRuby

Initial Comment:
Gem.default_exec_format assumes that the Ruby interpreter command line (RbConfig::CONGIF[:ruby_install_name]) is of the form *ruby*. This works for command lines like ruby, ruby18, ruby19, jruby, etc. However, this does not work for IronRuby where the command line is "ir.exe". 

As a result, "ir.exe -S gem update --system" fails with the call stack shown below. This is a serious issue for IronRuby.

RubyGems should have some way of dealing with such command lines. It could perhaps look at some new config setting, eg. RbConfig::CONFIG["defaul_exec_format"]. Or it could just append "%s" to RbConfig::CONGIF[:ruby_install_name].

lib/rubygems/defaults.rb:57:in `default_exec_format'
lib/rubygems/commands/setup_command.rb:72:in `description'
lib/rubygems/command.rb:393:in `create_option_parser'
lib/rubygems/command.rb:359:in `parser'
lib/rubygems/command.rb:328:in `handle_options'
lib/rubygems/command.rb:251:in `invoke'
lib/rubygems/command_manager.rb:134:in `process_args'
lib/rubygems/command_manager.rb:104:in `run'
lib/rubygems/gem_runner.rb:58:in `run'
setup.rb:35

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

>Comment By: James Tucker (raggi)
Date: 2010-03-23 07:19

Message:
Good point, i think the answer is, there should be...

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

Comment By: Shri Borde (shrib)
Date: 2010-03-23 06:18

Message:
The failure above happens in the child process spawned by 
the main "ir.exe -S gem update --system" process. The 
command line of the child process is "ir.exe setup.rb" and 
it executes in the rubygems-update gem folder after 
downloading the latest version of the rubygems-update gem. 
So if I add lib/rubygems/ironruby.rb, it would help with 
most commands except for "update --system". Is there a way 
to fix it for "update --system" too?

Thanks for the comments. 

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

Comment By: James Tucker (raggi)
Date: 2010-03-22 08:38

Message:
Seems that iron ruby should be overriding default_exec_format in its own defaults/[engine].rb .

>From the documentation:

# == RubyGems Defaults, Packaging
#
# RubyGems defaults are stored in rubygems/defaults.rb.  If you're packaging
# RubyGems or implementing Ruby you can change RubyGems' defaults.
#
# For RubyGems packagers, provide lib/rubygems/operating_system.rb and
# override any defaults from lib/rubygems/defaults.rb.
#
# For Ruby implementers, provide lib/rubygems/#{RUBY_ENGINE}.rb and override
# any defaults from lib/rubygems/defaults.rb.


HTH

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

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


More information about the Rubygems-developers mailing list