What version of ruby use with cygwin?

2020-07-27 23:47发布

问题:

I'm using cygwin and install on them ruby, so cause I don't have much experiences with ruby I always get much error that those version is buggy to use fix, and many more... So my question is what version of ruby use with cygwin, that bypass all those problems?

回答1:

I recommend installing the latest version from rubyinstaller.org as well as the devkit from the same page. When you install it choose the option to add ruby to your path.

To get gem and the other batch files working correctly from cygwin you can add something like this to your .bash_profile:

ruby=`which ruby|perl -pe 's/\/[^\/]*$//'`
for i in `/bin/ls -1 $ruby/*.bat`
do
  alias `basename "$i" .bat`=$i
done