See https://github.com/laserlemon/figaro to correctly deploy on heroku or other provider. (mailers) On development you need to add credentials (MAIL_USERNAME: and GMAIL_PASSWORD:) into config/application.yml fileG
Check db configuration especially sockets in config/database.yml