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

Vladimir Sizikov vsizikov at gmail.com
Wed Jun 25 17:53:58 EDT 2008

Hi Eric,

Thanks for very quick response!

On Wed, Jun 25, 2008 at 11:46 PM, Eric Hodel <drbrain at segment7.net> wrote:

>> 1. gem install and gem update commands. I'd like to customize the
>> default options.
>>  More specifically, to enable env_shebang option.
> I think Gem::ConfigFile can be changed to set this as default.  I'll explore
> it.

The ideal case would be to have zero "hacks/patches" over official
rubygems sources, so if there is a way to provide command defaults and
not modifying
the official sources, that would be the best.

I think #{RUBY_ENGINE}.rb is a good start.

>> 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.
> How do you want to change shebang?  Maybe we can make the change in the
> installer instead.

In JRuby, the main executable name on Windows is jruby.bat. If you
have the shebang:
#!/usr/bin/env jruby.bat

That won't work on Cygwin, but
#!/usr/bin/env jruby  - will work

So, we currently modify that shebang method to return the appropriate one.


More information about the Rubygems-developers mailing list