default ruby lib path "$:" problem

J

Jandr Jandr

I am trying to install and run ruby from rpm but I am missing ruby
library paths

I install irb and try to run it and I get

/usr/bin/irb:10:in `require': no such file to load -- irb (LoadError)
from /usr/bin/irb:10

bash> ruby -e "puts $:"




/usr/lib/ruby//site_ruby
/usr/lib/ruby//site_ruby
/usr/lib/ruby//site_ruby
 
L

Luis Lavena

I am trying to install and run ruby from rpm but I am missing ruby
library paths

I install irb and try to run it and I get

/usr/bin/irb:10:in `require': no such file to load -- irb (LoadError)
  from /usr/bin/irb:10

bash> ruby -e "puts $:"

/usr/lib/ruby//site_ruby
/usr/lib/ruby//site_ruby
/usr/lib/ruby//site_ruby

Please provide more information about Linux version you're using and
more important, what version of Ruby are you trying to use (ruby -v)

Some linux distro slice ruby into different pieces so irb is not ship
with "ruby" package.

With that information, we will be able to help you further.
 
J

Jandr Jandr

Luis said:
Please provide more information about Linux version you're using and
more important, what version of Ruby are you trying to use (ruby -v)

Some linux distro slice ruby into different pieces so irb is not ship
with "ruby" package.

With that information, we will be able to help you further.

Running

CentOS release 5.5 (Final)

Linux host1 2.6.18-194.11.1.el5 #1 SMP Tue Aug 10 19:05:06 EDT 2010
x86_64 x86_64 x86_64 GNU/Linux

bash> ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]

I can run irb when I cd to /usr/lib/ruby/1,8, or set my RUBYLIB to
include /usr/lib/ruby/1.8.

Here is $LOAD_PATH.

irb(main):001:0> $LOAD_PATH
=> ["", "", "", "/usr/lib/ruby//site_ruby", "/usr/lib/ruby//site_ruby",
"/usr/lib/ruby//site_ruby", "", "", "", "", "", "", "."]

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top