Reputation: 2973
And i tried to search and apply these solutions but it still failure. Here are some result which i found but i didn't successfully.
This is problem show in production.log
This is my log:
Started GET "/videos/favicon.ico" for 42.112.87.124 at 2015-07-12 19:26:54 +0700
Processing by VideosController#show as
Parameters: {"id"=>"favicon"}
Video Load (0.2ms) SELECT `videos`.* FROM `videos` WHERE `videos`.`id` = 0 LIMIT 1
Completed 500 Internal Server Error in 3ms
And this is code in my application.html.erb
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag 'application', media: 'all'%>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
And this is my routes.rb
:
resources :videos, only: [:index, :show]
But everytime i called to action show, it always returned a params[:id]="favicon"
. And i didn't understand why it happened ?.
Hope everybody can explain for me. Thank you very much.
Upvotes: 1
Views: 279
Reputation: 106922
Change
<%= favicon_link_tag 'favicon.ico' %>
to
<%= favicon_link_tag '/favicon.ico' %>
to load the favicon from the server's root instead of the folder relative to the document.
Upvotes: 1