Problems installing rubygems -No such file to load: rubygems

Hi,

I’m a bit of a beginner at this and I’m having some problems with
installation, hopefully someone can help.

I’m following the guide for setting up under Mac OS X at

. I follow the tutorial all the way through without any errors but when
it comes to the MySQL Native Bindings step I get an error saying:

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

I thought it would be alright to skip this step since it is not
required, but when I try and start the server I get the same error. I
ran through the steps of the tutorial again in case I had missed
something the first time but the error is still there.

Any help would be great.

Thanks

David Egan wrote:

Hi,

I’m a bit of a beginner at this and I’m having some problems with
installation, hopefully someone can help.

I’m following the guide for setting up under Mac OS X at
Dan Benjamin
. I follow the tutorial all the way through without any errors but when
it comes to the MySQL Native Bindings step I get an error saying:

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

Sounds like in the RubyGems section, instead of:

sudo /usr/local/bin/ruby setup.rb

you typed

sudo ruby setup.rb

and the rb files for rubygems have been installed somewhere else (the
tiger default ruby, rather than the /usr/local/bin one).

Strange that gem install rails worked, though…

If you still have the source (even if you don’t) I’d go back to that
step in the hivelogic tutorial. I follwed it to the letter on a newly
wiped Tiger Powerbook and it all worked like a charm.

A.

Alan F. wrote:

David Egan wrote:

Hi,

I’m a bit of a beginner at this and I’m having some problems with
installation, hopefully someone can help.

I’m following the guide for setting up under Mac OS X at
Dan Benjamin
. I follow the tutorial all the way through without any errors but when
it comes to the MySQL Native Bindings step I get an error saying:

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

Sounds like in the RubyGems section, instead of:

sudo /usr/local/bin/ruby setup.rb

you typed

sudo ruby setup.rb

and the rb files for rubygems have been installed somewhere else (the
tiger default ruby, rather than the /usr/local/bin one).

Strange that gem install rails worked, though…

If you still have the source (even if you don’t) I’d go back to that
step in the hivelogic tutorial. I follwed it to the letter on a newly
wiped Tiger Powerbook and it all worked like a charm.

A.

I’ve rerun everything in the tutorial and this time I made sure that I
entered everything exactly as it is on the page. Still have the same
error message. Is it possible that it is conflicting with something else
on my system given that exactly the same instructions appear to have
worked for others. And if so how would I check for a conflict.

Thanks.

David Egan wrote:

I’ve rerun everything in the tutorial and this time I made sure that I
entered everything exactly as it is on the page. Still have the same
error message. Is it possible that it is conflicting with something else
on my system given that exactly the same instructions appear to have
worked for others. And if so how would I check for a conflict.

Thanks.

It’s VERY weird that

sudo gem install rails

would find rubygems okay, but

sudo gem install mysql

wouldn’t.

What do you get if you just type sudo gem install mysql ? If you try
and install another few gems, what happens ?

e.g.

sudo gem install capistrano
sudo gem install redcloth

If all are well, I’d have to go with the tricksy arguments theory. Have
you triple checked the additional args when installing mysql ?

sudo gem install mysql
with-mysql-dir=/usr/local/mysql

A.