How to get a pik pearl to play beautifully with cygwin in Windows XP? Or is there another way to get multiple versions of ruby ​​and run in cygwin?

Pik looks great if you are stuck on a Windows machine. The only problem is that it is configured for the Windows command line and I am using cygwin.
Whenever I try to switch to a different version of ruby ​​in cygwin, it still just uses the cygwin installation by default 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] 

It doesn't seem to matter what I'm trying to - it always installs the cygwin installation by default. If I test this on the Windows command line, everything works fine. It’s just a kigwin somehow getting in the way and I’ll be damned if I give up my cygwin for the shitty XP command line .:}

+4
source share
1 answer

So, I dropped pik and went with (at least to me) a general approach to Mac / Linux systems. I unpacked the compiled binaries of the various ruby ​​versions that I wanted in / tools / ruby. Then I wrote a few aliases 'ruby191' , etc. In my .zshrc, which create a symbolic link to the ruby ​​version I want in /tools/current_ruby . Add /tools/current_ruby/bin to your path, before any system installs the ruby ​​and voila version, you are ready to go.
If you want the rubigems to be installed, just download rubygems.zip, switch to the version of ruby ​​that you want to install, and then run ruby setup.rb in the rubygems directory. Now I have four different versions of ruby, each with rubygems installed, running and running on my machine.
Obviously, this only works now in cygwin, since windows do not understand symbolic links at all. But, apparently, it works fine.

+3
source

Source: https://habr.com/ru/post/1301467/


All Articles