2012-01-04 95 views
1

这是我第一次尝试使用Omniauth。当我从GitHub测试https://github.com/pt/devise-omniauth-example这个例子中,我碰到一个错误没有这样的文件加载 - openid/store/filesystem(Rails omniauth)

.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 

我搜索网站,但没有运气。

回答

1

这是由于您正在使用的各种版本的Gems以及它们之间的依赖关系。
。在https://github.com/pt/devise-omniauth-example的例子,
如果您发现该Gemfile,有

gem 'omniauth', '0.2.0' 

但在你上面的Gemfile中,使用的是

gem "omniauth", "1.0.1" 
+0

是的,因为我想使用所有最新的Gemfile。 – 2012-01-09 13:14:56

+0

更改版本帮助您摆脱错误? – 2012-01-11 06:01:49

+1

不适合我,但我终于通过添加宝石“oa-openid”来修复它,请检查我的答案中的链接。 – imwilsonxu 2012-09-13 09:34:31

5

根据this

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

gem "oa-openid"

0

添加gem 'ruby-openid-apps-discovery',并在下面application.rb增加。

require 'omniauth-openid' 
require 'openid' 
require 'openid/store/filesystem' 
require 'gapps_openid' 
相关问题