I have created a new rails app (3.2.8) using Devise. All is setup properly, the app starts, I can register as well as login.
I then added devise_openid_authenticatable which I understand is the gem to use for OpenID integration in devise. I followed the instructions on https://github.com/nbudin/devise_openid_authenticatable
But when I want to do rake db:migrate I get the following error:
rake aborted!
uninitialized constant Devise::Schema
When running rails s I get
/Users/me/.rvm/gems/ruby-1.9.3-p0/gems/devise_openid_authenticatable-1.0.0/lib/devise_openid_authenticatable/schema.rb:1:in `<top (required)>': uninitialized constant Devise::Schema (NameError)
from /Users/me/.rvm/gems/ruby-1.9.3-p0/gems/devise_openid_authenticatable-1.0.0/lib/devise_openid_authenticatable.rb:3:in `<top (required)>'
from /Users/me/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
from /Users/me/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/me/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
My Gemfile looks as follows (last two lines):
gem 'devise'
gem 'devise_openid_authenticatable'
And the User model as follows:
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :confirmable, :timeoutable, :openid_authenticatable
attr_accessible :email, :password, :password_confirmation, :remember_me
end
How to resolve the error?
The
devise_openid_authenticatablegem doesn’t look as though it has been maintained and updated to work with any current version of Devise.From the gems gemspec:
Which means that it will only work with 1.x versions of Devise. I think instead you may have better luck using something newer that is more well maintained. Have a look through this page on the Devise Wiki and you may find what you are looking for.
https://github.com/plataformatec/devise/wiki/OmniAuth%3A-Overview