我已經完成了標題中描述的錯誤的衆多解決方案。Subdomains + ActionView :: Template :: Error(缺少鏈接到的主機!)
ActionView::Template::Error (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true):
然而,這個項目還修改了url_for功能使用子域名,如在此railscast:
http://railscasts.com/episodes/221-subdomains-in-rails-3
因此,傳統的答案,這樣的錯誤,這樣的因爲在我的環境設置中設置變量似乎不是解決方案。
下面是其他一些提示:
- 這是新成立的一個品牌,我剛纔克隆一個項目,安裝紅寶石,鐵軌,寶石等
- 我已經試過「RVM內爆」和多次開始
- 團隊的其他成員通常在Mac上本地開發,而我正在遠程開發Ubuntu機器。
- 我的工作,作爲root(做這件事?)
完成500內部服務器錯誤1889ms
::的ActionView ::模板錯誤(缺少主機鏈接到請提供!主機參數,設置default_url_options [:host],或設置:only_path爲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 => 「滿足地」,:SRC =>「/images/logo_beta_premium.png"}/ 7:-else 應用程序/助手/ url_helper.rb:16:在url_for' app/views/shared/_logged_in_writer_nav.html.haml:4:in
_app_views_shared__logged_in_writer_nav_html_haml__656388632_107925510' 應用/views/layouts/application.html.haml:35:in block in _app_views_layouts_application_html_haml__193634629_107212530' app/helpers/application_helper.rb:15:in
html5_haml_tag ' 應用程序/視圖/佈局/ application.html.haml:2:_app_views_layouts_application_html_haml__193634629_107212530' app/controllers/application_controller.rb:18:in
error_generic'