rcach001
rcach001

Reputation: 3

RoR using Devise - Encrypted Password

Hi pardon my ignorance but I'm new to RoR. My problem is that I'm trying to make my Devise gem work but when I fill out the information and click Sign-Up, I get this in return: "undefined method `encrypted_password=' for".

I've already tried rake db:migrate and also clearing the attributes in the User.rb model but still it doesn't work.

Please any guidance would be appreciated!

Upvotes: 0

Views: 2046

Answers (3)

Dmytro Vasin
Dmytro Vasin

Reputation: 823

In the site railscasts.com you can watch:

http://railscasts.com/episodes/209-introducing-devise

after that you understand where you make a mistake If you then get an error - write comments and we help

P.S. gem 'devise', '1.1.rc0' => gem 'devise' in gemfile

Upvotes: 0

hwatkins
hwatkins

Reputation: 1416

In the rails console run, this will tell you if the migration has run

User.new.respond_to?(:encrypted_password=)

This should return true, if not do

bundle exec rake db:migrate:reset

Upvotes: 0

Milan Köpke
Milan Köpke

Reputation: 1133

This most likely means, that you are missing on migrations. Are you sure, that you have setup devise right?

https://github.com/plataformatec/devise

rails generate devise:install
rails generate devise User
bundle exec rake db:migrate

Upvotes: 2

Related Questions