Developing for Multiple Ruby Versions

When developing for multiple ruby versions, such as 1.8.x and 1.9.x, it is convenient to have separate command prompts open, one for each ruby version. To do so for win32/64 platforms, create separate batch files for each ruby version installed and add something along the lines of

set Path=c:\ruby186\bin;%Path%

This will open a new command prompt configured for the desired ruby version. Note, it does not matter if your Path environment variable contains additionally paths to ruby, since the desired ruby path is prepended to ensure precedence over whatever follows.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s