ActionView::Template::Error: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true

我的未来我决定 提交于 2019-12-02 19:00:15

In the end I added the following with the correct value to each environment file:

test.rb / development.rb / production.rb

Devise 3.2.x - 4.x.x

Rails 4.1.x && Rails 4.2.x && Rails 5.x.x

Thanks to maudulus

# Default Mailer Host
  Rails.application.routes.default_url_options[:host] = 'domain.com'

Try restarting the server. Even in Rails 4.1 the config is not reparsed without a restart.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!