Note that there are some explanatory texts on larger screens.

plurals
  1. POMissing host to link to action mailer
    primarykey
    data
    text
    <p>i am using rails and devise and i am trying to send emails but i get the following error in production and test eviroments, in development all works fine:</p> <p>ActionView::Template::Error: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true # ./app/views/devise/mailer/reset_password_instructions.html.erb:9:in `_app_views_devise_mailer_reset_password_instructions_html_erb___200197999_97517150'</p> <p>My development.rb</p> <pre><code>config.action_mailer.delivery_method = :smtp config.action_mailer.default_url_options = { :host =&gt; "localhost:3000" } config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.default :charset =&gt; "utf-8" </code></pre> <p>test.rb</p> <pre><code>config.action_mailer.delivery_method = :test config.action_mailer.default_url_options = { :host =&gt; "localhost:3000" } </code></pre> <p>production.rb</p> <pre><code> config.action_mailer.default_url_options = { :host =&gt; "mydomain.com" } config.action_mailer.delivery_method = :smtp config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = false config.action_mailer.default :charset =&gt; "utf-8" </code></pre> <p>reset_password_instructions.html.erb</p> <pre><code>&lt;p&gt;Hello, &lt;%= @resource.full_name %&gt;!&lt;/p&gt; &lt;p&gt;You have request a new passord&lt;/p&gt; &lt;p&gt;&lt;%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token =&gt; @token), class: 'btn btn-info' %&gt;&lt;/p&gt; &lt;p&gt;If you didn't request this, please ignore this email.&lt;/p&gt; &lt;p&gt;Your password won't change until you access the link above and create a new one.&lt;/p&gt; </code></pre> <p>Where is the error?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload