# No such file to load â€” ubygems (LoadError)

**URL:** <https://www.ruby-forum.com/t/no-such-file-to-load-a-ubygems-loaderror/123031>\
**Category:** Rails\
**Created:** [December 13, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-a-ubygems-loaderror/123031 "2007-12-13T15:26:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [December 13, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-a-ubygems-loaderror/123031/1 "2007-12-13T15:26:59Z")

</div>

All of a sudden, i’m getting this error when trying to launch the  
console -

no such file to load â€” ubygems (LoadError)

I’m using 1.2.3 as my base rails install and i also get the same problem  
in a project frozen to 1.1.6. I saw a blog post at  
[http://wharsojo.wordpress.com/2007/05/1](http://wharsojo.wordpress.com/2007/05/1) â€¦ loaderror/  
which recommended removing the RUBYOPT variable from my (windows)  
environment. On doing this, closing the console, restarting it and  
trying again, i instead get this error -

sh: /cygdrive/c/cygwin/bin/irb: /usr/bin/ruby: bad interpreter: No such  
file or directory

has anyone else seen this and know how to fix it?

thanks!  
max

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [December 13, 2007, 4:42pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-a-ubygems-loaderror/123031/2 "2007-12-13T16:42:31Z")

</div>

I would grep your rails directory for ‘ubygems’. It looks like  
_rubygems_ was misspelled somewhere.

-Bill

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [December 14, 2007, 10:11am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-a-ubygems-loaderror/123031/3 "2007-12-14T10:11:06Z")

</div>

If you remove the windows ruby.exe from your PATH, it will work in  
cygwin.

On Dec 13, 4:26 pm, Max W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [December 14, 2007, 10:57am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-a-ubygems-loaderror/123031/4 "2007-12-14T10:57:54Z")

</div>

marchi wrote:

> If you remove the windows ruby.exe from your PATH, it will work in  
> cygwin.
> 
> On Dec 13, 4:26 pm, Max W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

ah…thanks. I’ll have to reinstall cygwin - i found out it was to do  
with cygwin and deleted cygwin entirely (which i couldn’t get working  
anyway). I hate the windows command line though (it’s so broken) so  
i’ll reinstall cygwin and do as you suggest.

cheers!  
max
