What does “no such file to load — ubygems (LoadError)” mean?
When certain Ruby-based commands are run, you may see the following error:
/usr/bin/ruby: no such file to load -- ubygems (LoadError)
This is caused by having Ruby installed (usually via the 1-Click installer) under Windows in addition to the version of Ruby installed under Cygwin by E. The reasons behind the error message are somewhat arcane, but suffice it to say that the two versions are in conflict, thus causing the error. The issue is easily solved by unsetting the RUBYOPT environment variable: • Open System Properties (Under XP hit Win-Pause/Break or right-click My Computer and select Properties; under Vista, hit Win-Pause/Break or right-click Computer in the Start Menu, select Properties, then select “Advanced system settings”) • Select the Advanced tab, then click Environment Variables… • Under the System Variables section, delete the entry for RUBYOPT Note that under my Vista install, Ruby based commands seem to work just fine even with