Pik looks great if you’re stuck on a windows machine. The only problem is it appears to be set up for a windows command prompt, and I’m using cygwin.
Whenever I try to switch to a different version of ruby in cygwin, it still just uses the default cygwin installation of ruby.
$ pik list
186: ruby 1.8.6 (2009-06-08 patchlevel 369) [i386-mswin32]
187: ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin] *
187: ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mswin32]
191: ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mswin32]
$ pik switch 191
$ pik list
186: ruby 1.8.6 (2009-06-08 patchlevel 369) [i386-mswin32]
187: ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin] *
187: ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mswin32]
191: ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mswin32]
Doesn’t seem to matter what I attempt – it always defaults to the cygwin installation. If I test this on a windows command prompt everything works just fine. It’s just cygwin getting in the way somehow, and I’ll be damned if I’m giving up my cygwin for the crappy XP command line. :}
So I ditched
pikand went with a (what is to me at least) common approach on mac/linux systems.I unzipped the compiled binaries of the various ruby versions I wanted into /tools/ruby. I then wrote a few aliases
'ruby191'etc in my .zshrc that create a symbolic link to the ruby version I want in/tools/current_ruby. Add/tools/current_ruby/binonto your path before any system installed version of ruby and voila, you’re ready to go.If you want rubygems installed, simply download the rubygems.zip, switch to the version of ruby you want to install the gems under and run
ruby setup.rbin the rubygems directory. I’ve now got four different ruby versions, each with rubygems installed, up and running on my machine.This obviously only works in cygwin now, as windows doesn’t understand symbolic links at all. But poking around a bit, it seems to be working just fine.