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