[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

linux -- require question

Jay Damask

1/10/2008 1:42:00 PM

I'm a newbie. I've locally installed ruby and rubygems on my linux box
(call it /home/). I've successfully installs rails and rake via gem
install, however from irb I get:
irb(main):002:0> require 'rails'
LoadError: No such file to load -- rails
from (irb):2:in `require'
from (irb):2

but for something simple it succeeds:
irb(main):004:0> require 'date'
=> true

$gem list
does show me all the packages that I've installed, and

$gem env
correctly shows where the gems are located. I haven't explicitly set any
environment variables...

What do I need to do so that require finds the gems?

Thanks.
--
Posted via http://www.ruby-....

2 Answers

Joshua Schairbaum

1/10/2008 1:49:00 PM

0

Jay,

I believe that you first need to require 'rubygems' in IRB before you
can require any single gem.

Josh

On Jan 10, 2008, at 8:42 AM, Jay Damask wrote:

> I'm a newbie. I've locally installed ruby and rubygems on my linux box
> (call it /home/). I've successfully installs rails and rake via gem
> install, however from irb I get:
> irb(main):002:0> require 'rails'
> LoadError: No such file to load -- rails
> from (irb):2:in `require'
> from (irb):2
>
> but for something simple it succeeds:
> irb(main):004:0> require 'date'
> => true
>
> $gem list
> does show me all the packages that I've installed, and
>
> $gem env
> correctly shows where the gems are located. I haven't explicitly
> set any
> environment variables...
>
> What do I need to do so that require finds the gems?
>
> Thanks.
> --
> Posted via http://www.ruby-....
>


Jay Damask

1/10/2008 1:53:00 PM

0

Joshua Schairbaum wrote:
> Jay,
>
> I believe that you first need to require 'rubygems' in IRB before you
> can require any single gem.
>
> Josh

Josh,

oh man! It works now. Thanks so much.

-Jay

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