# Gems was working but not anymore

**URL:** <https://rubytalk.org/t/gems-was-working-but-not-anymore/36385>\
**Category:** ruby-talk\
**Created:** [23 March 2007 12:20 UTC](https://rubytalk.org/t/gems-was-working-but-not-anymore/36385 "2007-03-23T12:20:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarosh\_Lists](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@Sarosh\_Lists](https://rubytalk.org/u/Sarosh_Lists)\
**Post date:** [23 March 2007 12:20 UTC](https://rubytalk.org/t/gems-was-working-but-not-anymore/36385/1 "2007-03-23T12:20:06Z")

</div>

I installed Ruby, Gems, Rails etc. following the instructions on  
[http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx](http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx)  
(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)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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:** ![Sarosh\_Lists](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@Sarosh\_Lists](https://rubytalk.org/u/Sarosh_Lists)\
**Post date:** [23 March 2007 12:45 UTC](https://rubytalk.org/t/gems-was-working-but-not-anymore/36385/2 "2007-03-23T12:45:16Z")

</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:** ![James\_Britt](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@James\_Britt](https://rubytalk.org/u/James_Britt)\
**Post date:** [23 March 2007 12:50 UTC](https://rubytalk.org/t/gems-was-working-but-not-anymore/36385/3 "2007-03-23T12:50:16Z")

</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!

> **···**
>
> On Mar 23, 2007, at 9:20 PM, sarosh.lists@gmail.com wrote:
> 
> > I installed Ruby, Gems, Rails etc. following the instructions on  
> > [Dan Benjamin](http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx)  
> > (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)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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
