ruby-openid is breaking my rake

Hi,

I'm having a weird problem:

[~/rails/hip]# rake routes
(in /home/mydomain/rails/hip)
Missing these required gems:
  ruby-openid >= 2.0.4

You're running:
  ruby 1.8.6.287 at /usr/bin/ruby
  rubygems 1.3.1 at /home/mydomain/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

Hi, any ideas anyone why a gem wouldn't be found even if I can use it?
And it would break the rake command?

I guess it is some configuration but I can't get it to work.

Cheers.

Hi,

Still fighting with this one. I think the problem is actually the
open_id_authentication plugin, not the ruby-openid gem.

This is the init.rb of the pluging, which should be ok and up to rails
2.x changes.

if config.respond_to?(:gems)
  config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.0.4'
else
  begin
    require 'openid'
  rescue LoadError
    begin
      gem 'ruby-openid', '>=2.0.4'
    rescue Gem::LoadError
      puts "Install the ruby-openid gem to enable OpenID support"
    end
  end
end

config.to_prepare do
  ActionController::Base.send :include, OpenIdAuthentication
end

The call should be:

     gem 'ruby-openid', :lib => 'openid'

The name of the file to be required is 'openid' and not ruby-openid.

Hey, Mauricio thanks a lot for dropping by.

The call should be:
     gem 'ruby-openid', :lib => 'openid'

Isn't that covered with this line in the init.rb?
config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.0.4'

Maybe I didn't get your point. Do you mean a similar call is needed
somewhere else?

Regards

Oh, i'm sorry, i missed it, just saw the::

     gem 'ruby-openid', '>=2.0.4'

Hi, any ideas anyone why a gem wouldn't be found even if I can use it?

I had a similar problem a while back.

I'd upgraded from ruby 1.8.6 to 1.8.7 and the default installation
path changed from /usr/bin to /usr/local/bin. I upgraded rubygems at
the same time and reinstalled all my gems, so I had two complete
versions of both ruby and rubygems on my system.

After the upgrade things got strange. When I ran any of my ruby
scripts from the console they worked perfectly, but when I ran them
from the rails app it couldn't find a couple of recently-installed
gems.

It finally dawned upon me that it was a difference in paths: I was
running the console as user 'root', but the rails app was being run
under a mongrel cluster as user 'mongrel'. I set a global path to
ruby for all users in /etc/profile and restarted the mongrels, and
suddenly the rails app started working :wink: