Help with Leopard

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

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-forum.com/\.

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-forum.com/\.

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-forum.com/\.