[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Can't require rubygems on osx

Chris Hoeppner

3/5/2009 8:50:00 PM

Hey there!

Pretty weird, actually, but I can't require rubygems on osx. I *know*
it's installed, been using it for ages to install gems. But no way I can
"require 'rubygems'", not in irb, not in a sourcefile:

[~]% ruby -e "require 'rubygems'"
-e:1:in `require': no such file to load -- rubygems (LoadError)
from -e:1
[~]%

Is this usual? If I recall correctly, gems was installed from source,
maybe I missed some rough corner, or something.
--
Posted via http://www.ruby-....

2 Answers

Sandor Szücs

3/5/2009 11:44:00 PM

0


On 05.03.2009, at 21:50, Chris Hoeppner wrote:
> Pretty weird, actually, but I can't require rubygems on osx. I *know*
> it's installed, been using it for ages to install gems. But no way I =20=

> can
> "require 'rubygems'", not in irb, not in a sourcefile:
>
> [~]% ruby -e "require 'rubygems'"
> -e:1:in `require': no such file to load -- rubygems (LoadError)
> from -e:1
> [~]%

On Mac OSX 10.5 is ruby,irb,gem preinstalled in /usr/bin/ . I am not =20
sure
on OSX < 10.5.
Maybe you can try if that works: /usr/bin/ruby -e 'require "rubygems"'

Maybe you have installed more than one ruby and irb on your computer.
If you run a zsh then you can ask with `where ruby`, where in the system
ruby is found.

If you installed ruby and irb from macports, then it will not find
rubygems, because you need the package rb-rubygems installed, too.

hth. regards, Sandor Sz=FCcs
--




Chris Hoeppner

3/6/2009 10:37:00 AM

0

Sandor Szücs wrote:
>
> On Mac OSX 10.5 is ruby,irb,gem preinstalled in /usr/bin/ . I am not
> sure
> on OSX < 10.5.
> Maybe you can try if that works: /usr/bin/ruby -e 'require "rubygems"'
>
> Maybe you have installed more than one ruby and irb on your computer.
> If you run a zsh then you can ask with `where ruby`, where in the system
> ruby is found.
>
> If you installed ruby and irb from macports, then it will not find
> rubygems, because you need the package rb-rubygems installed, too.
>
> hth. regards, Sandor
> Sz�cs

You got me on the right track. When installing rubygems from source, I
ran "rake install", instead of "/my/ruby setup.rb".

Most of the times, the most weird problems, arise when one makes a
simple but crucial mistake.
--
Posted via http://www.ruby-....