【发布时间】:2011-03-12 07:42:21
【问题描述】:
我在 rails3 beta4 中使用 devise_openid_authenticable 来支持 OpenID。
但是当我运行 rake db:migrate 时,会发生 [undefined method `apply_schema'] 错误。像这样:
== DeviseCreateUsers: migrating ==============================================
-- create_table(:users)
rake aborted!
An error has occurred, all later migrations canceled:
undefined method `apply_schema' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x1036ffb40>
这是我的迁移文件:
类 DeviseCreateUsers 假 t.openid_authenticable t.recoverable t.rememberable t.trackable # t.confirmable # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both # t.token_authenticable t.timestamps 结尾 add_index :users, :identity_url, :unique => true # add_index :users, :email, :unique => true # add_index :users, :reset_password_token, :unique => true # add_index :users, :confirmation_token, :unique => true # add_index :users, :unlock_token, :unique => true 结尾 def self.down drop_table :用户 结尾 结尾还有config.middleware.use Rack::OpenID 在config/application.rb 中
有人可以帮帮我吗?谢谢!
【问题讨论】:
-
是不是复制粘贴错了?第一行看起来像你做的那样。即:
class DeviseCreateUsers false -
不,我的粘贴正确。它不会创建用户表。感谢您的回复。
标签: ruby-on-rails openid devise