[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

ruby and paths

Fibre Optic

9/19/2007 3:04:00 PM

Hello iahve just installed Ruby grom sources. Here i a command I have
executed:
$ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]

Unfortunately I am not able to start up the irb:
$irb -v
/usr/bin/irb:10:in `require': no such file to load -- irb (LoadError)
from /usr/bin/irb:10

Yhe irb. rb is available undet the following directory:
$find / -name irb.rb
/lib/ruby/1.8/irb.rb

What should I to addjust? How the ruby searches when looking for
libraris i.e. irb.rb or socket.rb? How to fix the problem?

Regards,
FO
3 Answers

Stefano Crocco

9/19/2007 3:48:00 PM

0

Alle mercoledì 19 settembre 2007, Fibre Optic ha scritto:
> Hello iahve just installed Ruby grom sources. Here i a command I have
> executed:
> $ruby -v
> ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
>
> Unfortunately I am not able to start up the irb:
> $irb -v
> /usr/bin/irb:10:in `require': no such file to load -- irb (LoadError)
> from /usr/bin/irb:10
>
> Yhe irb. rb is available undet the following directory:
> $find / -name irb.rb
> /lib/ruby/1.8/irb.rb
>
> What should I to addjust? How the ruby searches when looking for
> libraris i.e. irb.rb or socket.rb? How to fix the problem?
>
> Regards,
> FO

You can see the ruby load path with the following command:

ruby -e 'puts $:'

The ruby load path (which can be accessed from ruby using the $: variable) is
made by some hard coded directories, depending on the installation path
passed to the configure script, by the contents of the RUBYLIB environment
variable and by directories passed to ruby via the -I command line option.

From what you posted, it seems that the ruby executable (at least, the irb
executable) is installed with a different prefix than the ruby libraries (the
former in /usr, the latter in /). This is a setup I've never tried, but I
think can be obtained passing options like --bindir and the like to
configure. If you didn't use such options, I'd suggest you to reinstall ruby
passing only the --prefix=/usr option to the configure script. This should
leave you with the following setup:

/usr/bin/
ruby
irb
erb
rdoc
...

/usr/lib/ruby/1.8/
abbrev.rb
benchmark.rb
irb.rb
irb
bigdecimal
...

If you truly meant to install the libraries there, I can't help you much (as I
said, I've no experience with that setup). You can try adding /lib/ruby/1.8
to the RUBYLIB environment variable or passing the -I/lib/ruby/1.8 option to
irb.

I hope this helps

Stefano

Fibre Optic

9/19/2007 5:33:00 PM

0

Stefano Crocco wrote:
>
> You can see the ruby load path with the following command:
>
> ruby -e 'puts $:'
>
> The ruby load path (which can be accessed from ruby using the $: variable) is
> made by some hard coded directories, depending on the installation path
> passed to the configure script, by the contents of the RUBYLIB environment
> variable and by directories passed to ruby via the -I command line option.
>
> From what you posted, it seems that the ruby executable (at least, the irb
> executable) is installed with a different prefix than the ruby libraries (the
> former in /usr, the latter in /). This is a setup I've never tried, but I
> think can be obtained passing options like --bindir and the like to
> configure. If you didn't use such options, I'd suggest you to reinstall ruby
> passing only the --prefix=/usr option to the configure script. This should
> leave you with the following setup:
>
> /usr/bin/
> ruby
> irb
> erb
> rdoc
> ...
>
> /usr/lib/ruby/1.8/
> abbrev.rb
> benchmark.rb
> irb.rb
> irb
> bigdecimal
> ...
>
> If you truly meant to install the libraries there, I can't help you much (as I
> said, I've no experience with that setup). You can try adding /lib/ruby/1.8
> to the RUBYLIB environment variable or passing the -I/lib/ruby/1.8 option to
> irb.

Hi,

it was nice hint... at first attempt I tried to configure ruby on this way:
../configure --target=$(GNU_TARGET_NAME) --host=$(GNU_TARGET_NAME) --build=$(GNU_HOST_NAME) $(DISABLE_NLS) $(DISABLE_LARGEFILE) --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/lib --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info
Unfortunately it did no work... after I received your answer I tried this:
../configure --target=$(GNU_TARGET_NAME) --host=$(GNU_TARGET_NAME) --build=$(GNU_HOST_NAME) $(DISABLE_NLS) $(DISABLE_LARGEFILE) --prefix=/usr
and it works good!

Regards,
FO

Mark Borgerson

1/22/2011 1:04:00 AM

0

In article <marek1965-94A849.10581921012011@news.giganews.com>,
marek1965@comcast.net says...
>
> In article
> <15e8d87f-655b-41f1-a9f2-3cce4b4618c5@r19g2000prm.googlegroups.com>,
<<SNIP>>
>
> Let's put this into perspective: We have massive illegal immigration
> with millions of illiterates swamping into the country and welcomed by
> elements of the left and right alike.

How are these illiterates 'swamping into the country'? IIRC, most of
the hispanic immigrants are coming in via desert areas. ;-)

"millions of illiterates" is probably not the proper term either, since
Mexico, the source of a majority of hispanic immigrants, has a 91%
literacy rate. I suspect that the literacy rate amongst those strongly
enough motivated to cross the border illegally is even higher than
91%.
>
> So 18 kids? Whose complaining? Until we declare that we need to be
> more conscientious about population growth and put some teeth in the
> policy, good for them!
>
> In addition, Golden One didn't indicate whether the family had a lot of
> resources to raise these children or send them to school, but they
> probably were not beneficiaries of the welfare system or criminals. So
> again, maybe it wasn't so bad after all!
>
> I have friends who are social workers and they have told me stories
> about women bouncing from one abusive relationship to another and
> usually squeezing out a kid for each one. This isn't meant to excuse
> abusive relationships but rather put into perspective that shacking up
> or getting divorced isn't necessarily a guaranteed solution. Perhaps
> some therapy would have been appropriate. In addition, spousal abuse
> was common back then for BOTH genders. VAWA has not addressed spousal
> abuse by women against men and probably often looks the other way when
> it's committed against children.
>
Aha. More anecdotal evidence from unspecified friends. Can't you do
better than that?
> Theoretically, professional families are supposed to have well educated
> yuppies who get married in their late 20's and early 30's and in those
> cases, they often have just 1 kid or even none due to fertility issues.
> So much for "planning".

I don't think fertility issues are an issue until the late 30's
(that's from first-hand experience.).

Mark Borgerson