我使用 Devise 创建了一个新的 rails 应用程序(3.2.8)。一切设置正确,应用程序启动,我可以注册和登录。
然后我添加devise_openid_authenticatable
了我理解的用于在设计中集成 OpenID 的 gem。我按照https://github.com/nbudin/devise_openid_authenticable上的说明进行操作
但是当我想做 rake db:migrate 我得到以下错误:
rake aborted!
uninitialized constant Devise::Schema
跑步时rails s
我得到
/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'
我的 Gemfile 如下所示(最后两行):
gem 'devise'
gem 'devise_openid_authenticatable'
用户模型如下:
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
如何解决错误?