简体   繁体   中英

Completed 500 Internal Server Error on heroku devise sign up

Keep getting this error when trying to sign up on live Rails app. The log also shows this:

    2015-06-15T00:13:57.424501+00:00 heroku[router]: at=info method=POST path="/users" host=viral-blocmarks.herokuapp.com request_id=9e9de849-e0fa-40d2-b9a9-d69b605bb55d fwd="71.163.107.55" dyno=web.1 connect=1ms service=105ms status=500 bytes=1754

The app runs fine in development mode, sign up and sign in without problems. Looked at the versions of my databases in local and remote heroku, and they are out of sync. Heroku version is this (heroku run rake db:version):

20150614012934

Local version is this (rake db:version):

20150614160654

I tried to sync them using

   heroku run rake db:migrate

But they don't sync, maybe because there is no difference. Anyway, I would appreciate some help since the answers to similar posts don't seem to work for me.

I ran the following, but it didn't help:

    heroku run rake db:reset

Went to the live app, and was NOT able to sign up. Got the logs, which had the same error

    Completed 500 Internal Server Error in 707ms (ActiveRecord: 10.0ms)                                                                                                                                                            
    2015-06-15T02:55:49.697158+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/static.rb:113:in `call'                                                                                                                        
    2015-06-15T02:55:49.697160+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/sendfile.rb:113:in `call'                                                                                                                                                  
    2015-06-15T02:55:49.697163+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:164:in `call'                                                                                                                                          
    2015-06-15T02:55:49.697161+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:518:in `call'                                                                                                                                               
    2015-06-15T02:55:49.697165+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/lock.rb:17:in `call'                                                                                                                                                       
    2015-06-15T02:55:49.697166+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/content_length.rb:15:in `call'                                                                                                                                             
    2015-06-15T02:55:49.697168+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/handler/webrick.rb:89:in `service'                                                                                                                                         
    2015-06-15T02:55:49.697171+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'                                                                                                                                                           
    2015-06-15T02:55:49.697169+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'                                                                                                                                                      
    2015-06-15T02:55:49.697172+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'   

found the error. I didn't modify my setup_mail.rb for production:

    if Rails.env.development? || Rails.env.production?

Once I added the OR clause, and then deployed, email sign up, confirmation and sign in all worked fine.

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