Default ruby lib path "$:" problem

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

.
bash>

Where is “$:” set at?

If I cd /usr/lib/ruby/1.8 and run irb it works.

I know setting RUBYLIB will work. But why are lib paths missing?

Thanks.

On Aug 27, 5:13 pm, Jandr J. [email protected] wrote:

/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.

Luis L. wrote:

On Aug 27, 5:13�pm, Jandr J. [email protected] wrote:

/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.

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs