Help with Leopard

S

Scott Tallarida

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.
 
L

lists

Did you do

require 'rubygems'

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

Scott Tallarida

lists said:
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?
 
M

Matt Rose

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

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,270
Messages
2,571,351
Members
48,036
Latest member
nickwillsonn

Latest Threads

Top