[Rubygems-developers] Customizing rubygems via #{RUBY_ENGINE}.rb

Vladimir Sizikov vsizikov at gmail.com
Wed Jun 25 17:10:49 EDT 2008

Hi guys,

I'm currently in a process of upgrading JRuby trunk with the latest
rubygems 1.2, and
trying to use the new feature to provide some JRuby specific
customization to rubygems via
#{RUBY_ENGINE}.rb file.

It worked very well in some cases, but I'm facing some problems when I
try to customize
things like commands, since that RUBY_ENGINE.rb file is loaded at the
end of rubygems.rb
file but *before* other things like commands are loaded.

Here are some use cases that I'd like to resolve somehow:

1. gem install and gem update commands. I'd like to customize the
default options.
   More specifically, to enable env_shebang option.

2. installer.rb has shebang(bin_file_name) method that works not
ideally with JRuby on Windows,
   and I'd like to provide customized version of that.

In both cases, I can't redefine/monkey-patch those things from

Any suggestions?

Thank you,

P.S. So far, rubygems 1.2 looks *very* impressive speed- and
memory-wise. Thanks!!

More information about the Rubygems-developers mailing list