[英]no such file to load — openid/store/filesystem (Rails omniauth)
This is first time I'm trying to use Omniauth. 这是我第一次尝试使用Omniauth。 While I was testing https://github.com/pt/devise-omniauth-example this example from github I came across an error
当我测试https://github.com/pt/devise-omniauth-example时,来自github的这个示例遇到了一个错误
.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)
Here is my Gemfile content 这是我的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
I search web but there was no luck. 我在网上搜索,但没有运气。
This is due to various versions of Gems you are using and the dependencies among them. 这是由于您使用的Gems版本不同以及它们之间的依赖性所致。
In the example at https://github.com/pt/devise-omniauth-example , 在https://github.com/pt/devise-omniauth-example的示例中,
if you notice the Gemfile ,there is 如果您注意到Gemfile ,则有
gem 'omniauth', '0.2.0'
but in your Gemfile above, you are using 但是在上面的Gemfile中,您正在使用
gem "omniauth", "1.0.1"
Add gem 'ruby-openid-apps-discovery'
, and add below in application.rb
. 添加
gem 'ruby-openid-apps-discovery'
,然后在application.rb
添加以下内容。
require 'omniauth-openid'
require 'openid'
require 'openid/store/filesystem'
require 'gapps_openid'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.