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.

Did you do

require ‘rubygems’

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

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?

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

Matt