# Gems was working but not anymore

**URL:** <https://www.ruby-forum.com/t/gems-was-working-but-not-anymore/89874>\
**Category:** Ruby\
**Created:** [March 23, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/gems-was-working-but-not-anymore/89874 "2007-03-23T13:20:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 23, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/gems-was-working-but-not-anymore/89874/1 "2007-03-23T13:20:34Z")

</div>

I installed Ruby, Gems, Rails etc. following the instructions on

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

(Me: using Intel, 10.4, all other settings and versions same as that  
website)

Gems was working as I was able to install Rails, Mongrel, Capistrano  
and MySql bindings, and I was able to make a test app, and start it  
using script/server  
This was sometime last week

Now, I wanted to do some tutorials today, but I wasn’t able to invoke  
script/server I got error:

/usr/local/bin/gem:9:in `require’: No such file to load – rubygems  
(LoadError)  
from /usr/local/bin/gem:9

I found out that I got the same error with anything that requires  
gems. i.e. gem install rails. I even reinstalled Gems but that didn’t  
help.

Any ideas on how I could get this working again? Thanks

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 23, 2007, 1:47pm UTC](https://www.ruby-forum.com/t/gems-was-working-but-not-anymore/89874/2 "2007-03-23T13:47:37Z")

</div>

Figured it out. When I did:

# ruby -v

it gave me 1.8.2, meaning that it had reverted to the version included  
with OSX for some reason.

I did this:

# . ~/.bash\_login

and it’s working again!

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 23, 2007, 1:51pm UTC](https://www.ruby-forum.com/t/gems-was-working-but-not-anymore/89874/3 "2007-03-23T13:51:39Z")

</div>

What have you installed since the last time gems worked?

In Terminal, type:  
which gem  
This should tell you the path to gem

Perhaps you have tried to do something which has a dependency that is  
missing.  
Many gems depend on other gems.  
it’s good to use the --include dependencies option when you install  
a gem.  
Also look into freezing your gems, but that’s a different matter.

Did you start/stop the server? (make sure it’s not already running!)  
Is Apache interfering? You may have to stop Apache to run another  
server.

check the GEM\_PATH also…  
in .gemrc

make sure you’re in the directory of your Rails app when you invoke  
script/server  
notice that is the local path from the rails app’s directory.  
To start that server from elsewhere:  
( If you’re in another directory )  
replace:  
script/server

with:  
~/rails\_app\_name\_here/script/server

(this assumes you have the app in the top level of your user account,  
in other words in your home directory which has your User Name)

Configuring paths can be a pain.  
…and hard to remember and keep track of.  
Rails relies on a little bit of Unix command line ability. The Unix  
in A Nutshell book is highly recommended as a reference to have around!
