require 'rubygems' fails (works in irb)

A

Adam Wilson

I am getting errors that rubygems cannot be found, when starting
rails-related ruby commands.

when I run

ls -l `which ruby`

and

cat `which gem` | head -n 1

I get the same directory which is also list in 'gem env'.

somehow ruby does not know where rubygems is.
but if I run it under irb:

irb(main):001:0> require 'rubygems'
=> true

I'm not sure where the missing link is.
I am running on osx here.

Any help much appreciated.
Thanks
 
B

Brian Candler

Adam said:
I am getting errors that rubygems cannot be found, when starting
rails-related ruby commands.

Please ask on a Rails mailing list if you are having problems with
Rails. Rails frigs about with the 'require' and rubygems mechanisms in
its own strange ways, and they're nothing to do with Ruby.
somehow ruby does not know where rubygems is.

The Rails mailing list would probably like to see your *exact* error
message.
 

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
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top