Heroku server does not work with Devise

I have a rails application that uses Devise for auth user. In localhost: 3000, my site is working fine. I can register, login, etc. However, when I git push heroku and try to register or login, I just get a 500 error.

Some specifications of my site: I use sqlite (I heard that this could be a problem) and changed the route / users / sign_up to / sign and / users / sign_in 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 causes a 500 error only on the hero?

+4
source share
4 answers

Just a thought. Do you have any outstanding migrations that you did not perform on Heroku? This is what I always forget. Just run heroku run rake db:migrate and see if that helps. There may not be an error in your code.

Hope this helps!

+16
source

Have you enabled SendGrid in your account so that it can actually send messages?

+2
source

I had the same problem for another reason: Remember to install

 config.mailer_sender = 'your-email-address.xyz' 

in devise.rb.

+1
source

There was the same problem. Running heroku run rake db: migrate worked for me

-1
source

All Articles