Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in fresh devise install "undefined method `database_authenticatable' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x1032ebce8>" #833

Closed
matenia opened this issue Feb 7, 2011 · 3 comments

Comments

@matenia
Copy link

matenia commented Feb 7, 2011

I tried to do a rake db:migrate and got the following

undefined method `database_authenticatable' for #ActiveRecord::ConnectionAdapters::TableDefinition:0x1032ebce8

i had started by creating an Account model instead of the normal User model, then just tried to run rake db:migrate ...
At this point the log says that code was updated 10 hours ago, so I hope this is only temporary.

Thanks,
Matenia

EDIT: I'm using Rails 3.0.3 and Ruby 1.8.7

@josevalim
Copy link
Contributor

Have you generated devise initializer using rails g devise:install. If you are getting this error, it is probably because you are not requiring 'devise/orm/active_record' in an initializer before running migrations.

@matenia
Copy link
Author

matenia commented Feb 7, 2011

aaahhh .... CR4P! ... forgot a step .... i've done it so many times before too! Must have just drawn a mental blank
I appreciate the quick response ..

I feel so stupid, but thanks.

@mrinterweb
Copy link

I found another instance where this can pop up. I intitially was using the devise with ActiveRecord and I had a migration that included the devise fields. I then switched to use Mongoid instead of ActiveRecord. I fixed the problem by removing the migration containing the devise fields.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants