I have a rails app that uses Devise for user auth. In localhost:3000 my site works perfectly. I can signup, login, etc. However, when I git push heroku
and try going to sign up or login, I just get a 500 error.
Some specs of my site: I'm using sqlite (I heard that may be a problem) and have changed the /users/sign_up route to /sign and /users/sign_in route to /login. My /configure/environments/development.rb has the code config.action_mailer.default_url_options = { :host => 'localhost:3000' }
and /configure/environments/production.rb has the code config.action_mailer.default_url_options = { :host => 'myPersonalApp.heroku.com' }
What is wrong that is causing the 500 error only on heroku?
Just a thought - Do you have any outstanding migrations that you have not performed on Heroku? That's something I always forget - Just run heroku run rake db:migrate
and see if that helps. Might not be an error in your code after all.
Hope this helps!
have you enabled SendGrid on your account so that it can actually send the messages?
I had the same problem for a different reason: Don't forget to set
config.mailer_sender = 'your-email-address.xyz'
in devise.rb.
Had the same issue. Running heroku run rake db:migrate worked for me
精彩评论