【发布时间】:2015-02-03 04:35:51
【问题描述】:
在 Heroku 上部署我的 rails 应用程序后,我遇到了一些问题。我的应用程序本质上是一个在线出租车预订平台。我已经使用设计来验证用户。我在开发环境的 SQLite DB 的用户表中有几个用户。因此,在开发环境中,当我尝试使用这些用户中的任何一个登录我的应用程序时,它工作得很好。但是,当我在 Heroku 上部署相同的内容并尝试使用相同的用户凭据登录时,它会显示“无效的电子邮件或密码”错误。
我检查了 Heroku 日志,不明白我哪里出错了。请帮忙!
2014-12-05T03:43:18.023059+00:00 app[web.1]: Processing by Devise::SessionsController#new as HTML
2014-12-05T03:43:18.017343+00:00 app[web.1]: Started GET "/users/sign_in" for 114.79.138.136 at 2014-12-05 03:43:18 +0000
2014-12-05T03:43:18.031662+00:00 app[web.1]: Rendered vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/app/views/devise/shared/_links.html.erb (0.4ms)
2014-12-05T03:43:18.031791+00:00 app[web.1]: Rendered vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/app/views/devise/sessions/new.html.erb within layouts/application (6.7ms)
2014-12-05T03:43:18.033007+00:00 app[web.1]: Completed 200 OK in 10ms (Views: 8.3ms | ActiveRecord: 0.0ms)
2014-12-05T03:43:18.395813+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=www.taxibol.in request_id=e7c11827-dbf9-4b6b-a208-e6c9c3b0cca2 fwd="114.79.138.136" dyno=web.1 connect=1ms
service=6ms status=304 bytes=133
2014-12-05T03:43:46.219043+00:00 app[web.1]: Started POST "/users/sign_in" for 114.79.138.136 at 2014-12-05 03:43:46 +0000
2014-12-05T03:43:46.226183+00:00 app[web.1]: Processing by Devise::SessionsController#new as HTML
2014-12-05T03:43:46.226214+00:00 app[web.1]: Parameters: {"utf8"=>"???", "authenticity_token"=>"+EssZfe0ztWQvwNXt0u7/j8ntpBIDdM/l/DusVTXRZI=", "user"=>{"email"=>"raju.s@merucabs.com", "password"=>"[
FILTERED]", "remember_me"=>"0"}, "commit"=>"Log in"}
2014-12-05T03:43:46.331970+00:00 app[web.1]: Rendered vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/app/views/devise/shared/_links.html.erb (0.4ms)
2014-12-05T03:43:46.332041+00:00 app[web.1]: Rendered vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/app/views/devise/sessions/new.html.erb within layouts/application (3.2ms)
2014-12-05T03:43:46.332936+00:00 app[web.1]: Completed 200 OK in 107ms (Views: 4.5ms | ActiveRecord: 0.0ms)
2014-12-05T03:43:46.221273+00:00 app[web.1]: Processing by Devise::SessionsController#create as HTML
2014-12-05T03:43:46.221311+00:00 app[web.1]: Parameters: {"utf8"=>"???", "authenticity_token"=>"+EssZfe0ztWQvwNXt0u7/j8ntpBIDdM/l/DusVTXRZI=", "user"=>{"email"=>"raju.s@merucabs.com", "password"=>"[
FILTERED]", "remember_me"=>"0"}, "commit"=>"Log in"}
2014-12-05T03:43:46.224795+00:00 app[web.1]: Completed 401 Unauthorized in 3ms
【问题讨论】:
-
确保你已经运行了所有的迁移,并且你在 heroku 数据库中拥有相同的用户名和密码。从 heroku 控制台检查
标签: ruby-on-rails ruby ruby-on-rails-4 heroku devise