0

I am a total newbie on programming and I tried to program email-confirmation with ruby on rails in development mode. I followed a tutorial for registration with email confirmation and they used sendgrid, an addon for heroku. I made an account there and installed everything.

Now here is the problem: When signing up and getting the email with the confirmation link, if I open the link this comes out on a new website (http://myapp.herokuapp.com/users/confirmation?confirmation_token=n6RmknbFU5G_uH4NrSZ1 ) Application Offline for Maintenance This application is undergoing maintenance right now. Please check back later.

enter image description here

So I cannot sign up. Where is the problem? What can I do?

in my user.db I wrote this:

  class User < ApplicationRecord
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable, :confirmable
end

in config/environments/developement.db I added this:

  config.action_mailer.default_url_options = { :host => 'myapp.herokuapp.com' }
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true

in initializers/setup_mail.rb I wrote: ActionMailer::Base.delivery_method = :smtp

ActionMailer::Base.smtp_settings = {
    :address => 'smtp.sendgrid.net',
    :port => '587',
    :authentication => :plain,
    :user_name => 'redacted@heroku.com',   
    :password => 'redacted',
    :domain => 'https://mysterious-forest-46337.herokuapp.com/',
    :enable_starttls_auto => true
}
Richard Peck
  • 76,116
  • 9
  • 93
  • 147
Peter
  • 719
  • 1
  • 8
  • 19

0 Answers0