2012-01-04 34 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' 
相關問題