I install plugin open_id_authentication and have this error:
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require': no such file to load -- rack/openid (LoadError)
when I try to start rails server
Actually, rack-openid installed in my system and i can load it from irb:
irb(main):001:0> require 'rack/openid'
=> true
I tried to add hack to Gemfile as I did with ruby-openid, but it did’t help:
gem "ruby-openid", :require => "openid"
gem "rack-openid", :require => "rack/openid"
I also have tried
gem "ruby-openid", :require => "rack/openid"
but:
/usr/lib/ruby/gems/1.9.1/gems/bundler-0.9.7/lib/bundler/runtime.rb:38:in `require': no such file to load -- rack/openid (LoadError)
In rails 2.3.5 app there isn’t this problem and I can’t understand why it happens in Rails 3.
The problem is this code at the top of the plugin’s init.rb
Bundler doesn’t seem to pick up on the gem requirement so you are missing the
rack-openidgem.The solution is to add the following to your
Gemfilein place ofruby-openid. (rack-openiddepends onruby-openidbut gems is aware of this and will install it as needed)Don’t forget to run
bundle installafter updating your Gemfile.