Bugs item #27995, was opened at 2010-03-21 22:44
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27995&group_id=126
Category: other
Group: v1.3.x
>Status: Closed
>Resolution: Rejected
Priority: 4
Submitted By: Shri Borde (shrib)
Assigned to: Eric Hodel (drbrain)
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: Ryan Davis (zenspider)
Date: 2010-11-12 17:07
Message:
As described by eric, this should be on ironruby to override in
rubygems/defaults/ironruby.rb
----------------------------------------------------------------------
Comment By: Eric Hodel (drbrain)
Date: 2010-04-20 20:47
Message:
rubygems/defaults/ironruby.rb would go in RbConfig::CONFIG['rubylibdir'] (not
in RuybGems) so it should be picked up even by setup.rb
----------------------------------------------------------------------
Comment By: James Tucker (raggi)
Date: 2010-03-23 00:19
Message:
Good point, i think the answer is, there should be...
----------------------------------------------------------------------
Comment By: Shri Borde (shrib)
Date: 2010-03-22 23: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 01: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
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers