Technology Errors

ruby.exe: No such file or directory — /cygdrive/c/ruby/bin/gem (LoadError)

When attempting to install a gem using cygwin on a Windows XP machine I received the below error. I was hoping I wasn’t going to have to reinstall RubyGems underneath cygwin because it would have just been a pain. I had Ruby installed and operational underneath cygwin but for some reason rubygems was not working. I decided to instead make an alias to point to the gem command that I had installed straight to Windows. Use the below command to add an alias to cygwin to make gem an available command.

Error: ruby.exe: No such file or directory — /cygdrive/c/ruby/bin/gem (LoadError)

To resolve use the below command from your cygwin bash prompt to create an alias for gem. On my laptop Ruby is installed in C:\ruby so the commands are located in C:\ruby\bin.