I have use devise_openid_authenticatable to support OpenID with devise in rails3 beta4.
But when I run rake db:migrate, it occurs [undefined method `apply_schema’] error.like this:
== DeviseCreateUsers: migrating ==============================================
-- create_table(:users)
rake aborted!
An error has occurred, all later migrations canceled:
undefined method `apply_schema' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x1036ffb40>
Here is my migration file:
class DeviseCreateUsers false
t.openid_authenticatable
t.recoverable
t.rememberable
t.trackable
# t.confirmable
# t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
# t.token_authenticatable
t.timestamps
end
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
end
def self.down
drop_table :users
end
end
And config.middleware.use Rack::OpenID in config/application.rb
Does anyone can give me a hand? Thank you!
I think I have fixed this problem.
First,type
$ bundle show devise_openid_authenticatableto see where the bundled gem is installed.e.g.
/Users/YOURNAME/.bundle/ruby/1.8/gems/devise_openid_authenticatable-1.0.0.alpha2cd in this directory and modify /lib/devise_openid_authenticatable/schema.rb
from
apply_schema :identity_url, Stringtoapply_devise_schema :identity_url, StringThat’s OK!