Jeremy Jeremy - 3 months ago 42
Ruby Question

Create a devise fixtures user devise a password

I have a rails 5 app running the latest devise and I'd like to create valid users for testing with the fixtures, but I can't update the password as the way devise has users set up there is no passwords column in the users table.

Is there a way to set the fixture up to work around this and have a working user?


provider: facebook
username: Jeremy

password: password

any test using that user returns:

ActiveRecord::Fixture::FixtureError: ActiveRecord::Fixture::FixtureError: table "users" has no column named "password".


Prepare your test database.

rake db:migrate
rake db:test:prepare