Gem Problem

When i $ Gem list . I clearly see "rmagick (2.5.1)" and "ruby-openid
(2.0.4)". Yet if i try to start my server while simple captcha" plugin
is installed i get

`require': no such file to load -- RMagick (MissingSourceFile)

i get a similar error when i use open_id_authentication.

I clearly have the gems installed, so RoR must be having a problem
finding them. How can i check that this is the case, and force RoR to
look in the right place? Weird since the ruby gem and rails gem work
fine. Rails -2.0.2

What is your output from:

=> gem env

?

Anita.

What do you get from:

$ irb

require "rubygems"

=> true

require "rmagick"

=> ??

require "open_id_authentication"

=> ??

require "select_another_gem_which_is_working_for_you"

=> ??

Interesting that you get a return value of false on the require
"rubygems" and yet you get a return value of true for subsequent gems.

I really don't know what to make of that.

The only other thing I was going to suggest was to call:
=> gem dependency rmagick
to reveal the dependencies for the gem and ensure they are installed.

Very odd that you have a false for require rubygems. Since you are
using the darwin kernel perhaps someone else with darwin experience
can jump in here. I don't know what to make of that result. On my
pc, my call to require "rubygems" in irb returns true, so require
"rubygems" returning false appears to be a bit of an anomaly.

I think I have gone as far as I can go, Richard. Hopefully someone
else jumps in.

Cheers,
Anita.

require "rubygems"

=> false

is normal (it just means that rubygems has allready been loaded
according to rubygems documentations).

gem dependency rmagick

(irb):18: warning: parenthesize argument(s) for future version
NameError: undefined local variable or method `rmagick' for main:Object
  from (irb):18

thanks for your help so far!

Welcome.

And thanks for clarifying the rational behind the return of false.

:slight_smile:
Anita.

Oh sorry, my bad.

Try the:
$ gem dependency rmagick
in a regular terminal, not in irb.

Anita.

Hmmm, a good question. I don't know the definitive answer since I
also understand that rmagick needs imagemagick.

When I call gem dependency for myself, some gems just return
themselves and nothing else.

anita@anitas-computer:~$ gem dependency heroku
Gem heroku-0.3

Whereas gems that I know require other gems return the other gems.

anita@anitas-computer:~$ gem dependency rails
Gem rails-2.1.0
  rake (>= 0.8.1)
  activesupport (= 2.1.0)
  activerecord (= 2.1.0)
  actionpack (= 2.1.0)
  actionmailer (= 2.1.0)
  activeresource (= 2.1.0)

But in my own experiments, I don't see any reference to any libs
identified that fall out of the rubygems arena. Not sure how to
access the dependencies on non-gem libs either.

But the fact that irb returned true when given the require "rmagick"
command gives me confidence that rmagick is successfully required when
needed. Meaning that the gem path allows the gem to be fetched when
called.

So if the paths are working and the gem responds when invoked, I don't
know what could be standing in the way of your app responding. Is
this in development on your home environment or is this app on a
server (development or production?). Has the app been frozen? Is
there anything in any of the directories such as vendor where the app
is going to fetch the gems rather than going to the directory outlined
when you ran => gem env ?

Those are all the other influences that I can think of at the moment.

And time for me to sign off for the night.

Best of luck, let me know what you discover.

Cheers,
Anita.

Thanks again for sticking with me, turns out it was a problem with my
IDE (which apparently stands for integrated develpment environment),
RadRails. Thats what i get for not forking out the bucks for textmate.
Except for these past two days ive lost trying to figure this problem
out, it has actually been a pretty good application.

Here is my forum post and resultant solution on aptana's website:

http://forums.aptana.com/viewtopic.php?p=21810#21810