[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

require library path

Krekna Mektek

1/30/2007 3:58:00 PM

Hi,

I want to load the date.rb file, but require 'date' results in :

/mk.rb:4:in `require': no such file to load -- date (LoadError)
from ./mk.rb:4

ruby is installed in ~/ruby/rubyinstall/

Apparently Ruby does not look over there, where is Ruby's library path defined?

Thanx!

Krekna

2 Answers

Thomas Hafner

1/30/2007 4:08:00 PM

0

"Krekna Mektek" <krekna@gmail.com> wrote/schrieb <8b24c8b10701300758y5e670cb1ob1d26609855a589c@mail.gmail.com>:

> Apparently Ruby does not look over there, where is Ruby's library
> path defined?

Run this on the shell and look at the output:
ruby -e 'puts $:'

You may consider to set the environvent variable RUBYOPT, e.g. (bash):
export RUBYOPT=r${HOME}/ruby/rubyinstall

Regards
Thomas

Krekna Mektek

1/31/2007 7:45:00 AM

0

thanks, I did the following now:

$:.push("~/ruby/rubyinstall/lib... etc")

It seems that the problem is that I compiled in the /tmp directory so
the library path points to /tmp/ruby/rubyinstall. I think I need to
recompile to get it in order again.

Krekna


2007/1/30, Thomas Hafner <thomas@hafner.nl.eu.org>:
> "Krekna Mektek" <krekna@gmail.com> wrote/schrieb <8b24c8b10701300758y5e670cb1ob1d26609855a589c@mail.gmail.com>:
>
> > Apparently Ruby does not look over there, where is Ruby's library
> > path defined?
>
> Run this on the shell and look at the output:
> ruby -e 'puts $:'
>
> You may consider to set the environvent variable RUBYOPT, e.g. (bash):
> export RUBYOPT=r${HOME}/ruby/rubyinstall
>
> Regards
> Thomas
>
>