Compromised IRB

Hello,

I’ve got an issue.
I tried to install Fink on my computer, and consequently Perl.
I’ve got a Mac OS 10.7.

Once I did that, I remember to have messed with the /sw/ directory, and
since I did that, Ruby is not able anymore to find the gems I indicate.

EG :

e4r:/ e4r$ irb
irb(main):001:0> require ‘rubygems’
=> true
irb(main):002:0> require ‘mechanize’
LoadError: no such file to load – mechanize
from /sw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
gem_original_require' from /sw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from (irb):2
irb(main):003:0>

What’s happening??? :frowning:

On Oct 26, 2011, at 8:15 AM, Leo M. wrote:

Hello,

I’ve got an issue.
I tried to install Fink on my computer, and consequently Perl.
I’ve got a Mac OS 10.7.

What’s happening??? :frowning:

I know nothing about fink.
So I have no idea what the immediate issue is.

I will mention that many (possibly most) folks who use ruby on OS X
install it via RVM (see http://beginrescueend.com/ ) using RVM’s
single-user (rather than system-wide) mode to avoid such problem.

So if you get hopelessly stuck, I suggest starting again with RVM.

Hope that helps.

Dan N.

On Wed, Oct 26, 2011 at 7:15 AM, Leo M. [email protected] wrote:

irb(main):003:0>

What’s happening??? :frowning:


Posted via http://www.ruby-forum.com/.

I also don’t know anything about Fink, but if you look at the load
error, it
says it’s from the file
/sw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb

But on my computer (Mac OSX 10.7.1) that file is not located there.

$ gem which rubygems/custom_require
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb

So maybe Fink or something installed a Ruby for its own purposes and
that it
got added to the load path in front of the system Ruby.

Ahhhhh was a silly (but not that much) matter.

Just because Fink install itself in /sw/ and set this one as the sole
$PATH variable… that’s why when I call a gem, that in my case is not
situated in /sw/bin/, I receive a “File not found” error.

It is sufficient to do an

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

to solve everything. :slight_smile: