没有这样的文件加载 - openid / store / filesystem(Rails omniauth)

时间:2012-01-04 09:54:42

标签: ruby-on-rails devise omniauth

这是我第一次尝试使用Omniauth。当我从github测试https://github.com/pt/devise-omniauth-example这个例子时,我遇到了一个错误

 .rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': no such file to load -- openid/store/filesystem (LoadError)

这是我的Gemfile内容

source 'http://rubygems.org'

gem 'rake'
gem 'rails'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'devise', :git => 'git://github.com/plataformatec/devise', :branch => 'master'
gem "omniauth", "1.0.1"
gem 'paperclip'
gem "simple_form", "~> 1.5.2"
gem 'twitter_oauth', '0.4.3'
gem "rest-client", "1.6.7", :require => "restclient"
gem "sluggable"


group :development, :test do
 gem 'rspec-rails'
 gem 'fixjour'
end

我搜索网络但没有运气。

3 个答案:

答案 0 :(得分:5)

根据this

如果你得到“openid / store / filesystem(LoadError)”,那么你可能需要将它添加到你的Gemfile中:

gem "oa-openid"

答案 1 :(得分:1)

这是由于您使用的各种版本的Gems以及它们之间的依赖关系 在https://github.com/pt/devise-omniauth-example的示例中,
如果您注意到Gemfile,则有

gem 'omniauth', '0.2.0'

但在上面的Gemfile中,您正在使用

gem "omniauth", "1.0.1"

答案 2 :(得分:0)

添加gem 'ruby-openid-apps-discovery',并在application.rb

中添加以下内容
require 'omniauth-openid'
require 'openid'
require 'openid/store/filesystem'
require 'gapps_openid'