[Rubyinstaller-devel] question on bat files

Luis Lavena luislavena at gmail.com
Sat Jan 31 15:34:50 EST 2009

On Sat, Jan 31, 2009 at 6:05 PM, Roger Pack <rogerpack2005 at gmail.com> wrote:
>> Are too obscure and contains lot cruft that I personally will like to
>> avoid. Being one of those having two interpreters in the path at the
>> same time (with the exact same name).
> So you're saying just leave it be, is that right?

Kind of?

> The only functionality I'm losing currently is that is c:\ruby18\bin
> is in the path, I can't run
> c:\ruby187\bin\gem.bat
> without taking it out of the path first.

The problem is not that, the problem is this:

Ruby 1.8:

Ruby 1.9:



So I have installed over there almost all the gems, switch from one
ruby to other is just as simple as cleanup the PATH.
Cleanup all the PATH from all the installed batch files is more problematic.

> I guess you may have a point though--how many people are going to have
> more than one version of ruby installed and be using both
> simultaneously?

I should finish up mrb.exe, is a standalone application that let you
alter the path between multiple ruby installations and share the
installed gems, It uses some Win32 trickery like Thread Injection, but
that's for other post :-P

> Then again maybe people would do that with 1.8.6 and 1.9, so they can
> go back and forth between the two, so it could crop up.

This issue was raised in mongrel and rubygems mailing list, and this
was our solution, there is no easy way to find, without require all
the hacking to find where ruby is installed.

> Thoughts?
> Thanks!

I'm sorry that we cannot please everybody, this was our best
alternative for this situation, but of course, there are drawbacks.

If you find something that work under all these scenarios, I believe
RubyGems and RubyInstaller will be the best place to test those :-)

Luis Lavena
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

More information about the Rubyinstaller-devel mailing list