I am using Devise 3.5.2 to handle user confirmations in my Rails 4.2 app. Confirmation emails are received correctly. However the confirmation link in the email does not include the protocol at all. This is not a problem in development but will be in production.
For instance, instead of being this:
http://localhost:3000/users/confirmation?confirmation_token=eBjysKrWkFHBf46qUf1Q
I get this:
localhost:3000/users/confirmation?confirmation_token=eBjysKrWkFHBf46qUf1Q
config/environments/development.rb
config.action_mailer.default_url_options = { protocol: 'http', host: 'localhost', port: 3000 }
So I am at a loss as to why the protocol string is not prepended. I have googled many related issues but have not turned up a relevant explanation. Any ideas what I could be doing wrong?
localhost
in production environment? – kalelcconfig/environments/development.rb
file – kalelc