You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActionView::Template::Error:
Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
...when running on a template that contains asset paths. I was able to solve this by updating production.rb, development.rb etc to set Rails.application.routes.default_url_options:
I am also looking for a better way to do this. In particular, I need to set the host dynamically but cannot simply modify default_url_options because it's not thread-safe.
I'm using Rails 4.1, and getting:
...when running on a template that contains asset paths. I was able to solve this by updating production.rb, development.rb etc to set Rails.application.routes.default_url_options:
This seems to work, but since I can imagine this is a common issue, wondering if there's a better way?
The text was updated successfully, but these errors were encountered: