Ruby 1.9 not finding gems

M

Mark Fraser

Hello,

I installed Ruby 1.9.1 on OSX Tiger using MacPorts.

Then I installed Rubygems into the new installation (by running the
setup.rb after changing my path to point to the new ruby executable).

Any gems that I install install fine and show up in 'gem list --local'
...and I verified that they are in the gems location in the ruby 1.9
installation. But I am unable to load them using:

require 'rubygems'
require '<gemname>'

('no such file to load -- <gemname>').

Any suggestions on what I may be missing?

thanks
 
K

Ken Bloom

Hello,

I installed Ruby 1.9.1 on OSX Tiger using MacPorts.

Then I installed Rubygems into the new installation (by running the
setup.rb after changing my path to point to the new ruby executable).

Any gems that I install install fine and show up in 'gem list --local'
..and I verified that they are in the gems location in the ruby 1.9
installation. But I am unable to load them using:

require 'rubygems'
require '<gemname>'

('no such file to load -- <gemname>').

Any suggestions on what I may be missing?

thanks

You're supposed to load by filename within the gems, rather than put the
gem name itself. For example, gem install SqlStatement, then require
'sqlstatement'

--Ken
 
J

Justin Collins

Mark said:
Hello,

I installed Ruby 1.9.1 on OSX Tiger using MacPorts.

Then I installed Rubygems into the new installation (by running the
setup.rb after changing my path to point to the new ruby executable).

Any gems that I install install fine and show up in 'gem list --local'
...and I verified that they are in the gems location in the ruby 1.9
installation. But I am unable to load them using:

require 'rubygems'
require '<gemname>'

('no such file to load -- <gemname>').

Any suggestions on what I may be missing?

thanks

1.9.1 comes with Ruby Gems, you shouldn't have to install it separately.
I would guess you overwrote the 1.9.1 gem stuff.

-Justin
 

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,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top