一个月Rails – 无效的电子邮件或密码
我花了大约一个星期的时间在“Mattan Griffel的一个月的路轨”上工作。 出于某种原因,当我返回时,密码或电子邮件对我的localhost:3000无效。 Mattan带领我们完成了使用email: user@example.com
注册我们的localhost页面的过程email: user@example.com
和password: foobar
,但它现在对我不起作用。 这可能是我在sublime中出现语法错误的错误,或者可能是什么问题?
这是终端在没有通过时读取的内容:
Started POST "/users/sign_in" for 127.0.0.1 at 2013-06-06 13:53:44 -0600 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"8rUKRPLsIttdHhv49tgT8KcvKbjT9mMP/lP5M/N8uPQ=", "user"=>{"email"=>"user@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'user@example.com' LIMIT 1
鉴于这之前有效,但现在已经不行了,我猜你可能只是使用了错误的密码。
请尝试以下命令在Rails控制台中重置密码:
User.find_by_email('user@example.com').update_attribute(:password, 'your_new_password')
然后,尝试重新登录,看看会发生什么。