Forum: Ruby on Rails Problems installing rubygems -No such file to load: rubygems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9a4061bf5a1f4bee81777fb407a003d3?d=identicon&s=25 David Egan (Guest)
on 2006-03-11 00:36
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
http://hivelogic.com/articles/2005/12/01/ruby_rail...
. 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
4daf0b71d5d9a3882e583c0e72eaf5dc?d=identicon&s=25 Alan Francis (Guest)
on 2006-03-11 01:04
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
> http://hivelogic.com/articles/2005/12/01/ruby_rail...
> . 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.
9a4061bf5a1f4bee81777fb407a003d3?d=identicon&s=25 David Egan (Guest)
on 2006-03-11 01:47
Alan Francis 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
>> http://hivelogic.com/articles/2005/12/01/ruby_rail...
>> . 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.
4daf0b71d5d9a3882e583c0e72eaf5dc?d=identicon&s=25 Alan Francis (Guest)
on 2006-03-15 16:43
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 <space> <dash><dash> <space>
<dash><dash>with-mysql-dir=/usr/local/mysql

A.
This topic is locked and can not be replied to.