On my windows 8.1+cygwin install, I had an windows ruby install. As I use mostly cygwin and cygwin and non-cygwin tools tend not to work well with each other, I wanted to move ruby to cygwin.

Unfortunately, installing ruby in cygwin yields a ruby command that fails:

$ ruby
<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
         from <internal:gem_prelude>:1:in `<compiled>'

$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-cygwin]

Also there's no gem command.

There is no ruby related thing in my environment:

$ set | grep -i ruby
(no result)

Perhaps something is remaining from the original windows ruby install? I have uninstalled using the "add or remove programs" windows feature.

I've tried googling the problem, reinstaling cygwin's ruby, but didn't find any solution. On my second windows10+cygwin install, ruby and gem work great on cygwin.

  • Might be you have better luck asking this on the mailing lists at www.cygwin.com – Hannu Sep 17 '15 at 17:00
  • 1
    There are some answers in SO that suggest how to make Cygwin + native Windows Ruby coexist nicely, for example stackoverflow.com/a/4260598/1040245 – golimar Aug 25 '16 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.