简体   繁体   中英

Rails Tutorial NoMethodError undefined method `activation_digest=' for #<User

I have been trying to extend the Rails Hartl tutorial. I seem to be running into an issue. On heroku I run into an issue, while on my machine it runs fine. When I try to create a user, I get this message in the logs.

"NoMethodError (undefined method `activation_digest=' for  #<User:0x00000003156938>

2018-03-21T01:58:59.786203+00:

00 app[web.1]: Did you mean?  activation_token=):"

Followed by

FATAL -- : [78d926f5-adcf-4bb2-a289-638c82d9f0f5] app/models/user.rb:72:in `create_activation_digest'

[78d926f5-adcf-4bb2-a289-638c82d9f0f5] app/controllers/users_controller.rb:22:in `create'

I have looked through both the users model and controller, but cannot find a reason as to why this does not run. They both match the source of Hartl's bitbucket. I have looked through db migrations and they all look correct as well.

My repository is listed here: https://bitbucket.org/Grev0ushede/blog_app/src/master/

从终端运行

heroku run rake db:migrate

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM