I have worked with numerous solutions to the error described in the title.
ActionView::Template::Error (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true):
However, this project also modified the url_for function to use subdomains, as shown in this railscast:
http://railscasts.com/episodes/221-subdomains-in-rails-3
Thus, traditional answers to this error, such as setting variables in my environment settings, do not seem to be a solution.
Here are some other tips:
- This is a completely new setting, I just cloned a project and installed ruby, rails, gems, etc.
- I tried rvm implode and started many times
- the rest of the team is usually developed locally on Mac computers, while I am developing on a Ubuntu machine remotely.
- I work as root (does it matter?)
Completed 500 internal server errors at 1889 m.
ActionView :: Template :: Error (No host to link to! Specify the parameter: host, set default_url_options [: host] or set: only_path to true): 1:% header.menu {: role => "banner"} 2: .col980 3:% h1 4:% a.logo {: href => root_url ({: subdomain => false})} 5: -if current_user.premium? 6:% img {: alt => "Contently" ,: src => "/images/logo_beta_premium.png"} / 7: -all app / helpers / url_helper.rb: 16: in url_for' app/views/shared/_logged_in_writer_nav.html.haml:4:in _app_views_shared__logged_in_writer_nav_html_haml__656388632_107925510 'app / views / layouts / application.html.haml: 35: in block in _app_views_layouts_application_html_haml__193634629_107212530' app/helpers/application_helper.rb:15:in .html.haml: 2: in _app_views_layouts_application_html_haml__193634629_107212530' app/controllers/application_controller.rb:18:in error_generic'
source share