[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Help with Leopard

Scott Tallarida

11/10/2007 3:44:00 AM

I am sure this is a basic question but I am having a problem with ruby
in leopard. I have installed the gem ar-extensions without any issue.
When I run require 'ar-extensions' from irb it works fine...but when I
write an .rb file with the same line under homeUser/apps/ruby i get the
"no such file to load" error. I think I have a basic misunderstanding
about how ruby commands are interpreted in the mac os...

any help would be awesome.
--
Posted via http://www.ruby-....

3 Answers

lists

11/10/2007 5:18:00 AM

0

Did you do

require 'rubygems'

before require-ing your gem in the script? irb in Leopard requires
rubygems for you (see /etc/irbrc).

On Nov 9, 2007, at 9:43 PM, Scott Tallarida wrote:

> I am sure this is a basic question but I am having a problem with ruby
> in leopard. I have installed the gem ar-extensions without any
> issue.
> When I run require 'ar-extensions' from irb it works fine...but when I
> write an .rb file with the same line under homeUser/apps/ruby i get
> the
> "no such file to load" error. I think I have a basic misunderstanding
> about how ruby commands are interpreted in the mac os...
>
> any help would be awesome.
> --
> Posted via http://www.ruby-....
>
>


Scott Tallarida

11/10/2007 3:42:00 PM

0

lists wrote:
> Did you do
>
> require 'rubygems'
>
> before require-ing your gem in the script? irb in Leopard requires
> rubygems for you (see /etc/irbrc).

That did the trick. Thanks. I've been coding in ruby for about a year
on the pc and never had to add this line to any of my scripts. Why is
that?
--
Posted via http://www.ruby-....

Matt Rose

11/10/2007 7:01:00 PM

0

Most Windows implementations I've seen automatically add the rubygems
require to the RUBYOPTS environment variable.

Matt

On 10-Nov-07, at 10:41 AM, Scott Tallarida wrote:

> lists wrote:
>> Did you do
>>
>> require 'rubygems'
>>
>> before require-ing your gem in the script? irb in Leopard requires
>> rubygems for you (see /etc/irbrc).
>
> That did the trick. Thanks. I've been coding in ruby for about a
> year
> on the pc and never had to add this line to any of my scripts. Why is
> that?
> --
> Posted via http://www.ruby-....