I put favicon.ico
into /public/
folder and include the following code into layout page
<%= favicon_link_tag %>
But inspite of it, the icon doesn't display. What should I do?
I put favicon.ico
into /public/
folder and include the following code into layout page
<%= favicon_link_tag %>
But inspite of it, the icon doesn't display. What should I do?
I have struggled with the same. This is what worked for me:
<%= favicon_link_tag 'favicon.ico' %>
and moving the favicon.ico
to the /public/images directory.
Good luck!
I don't know what favicon_link_tag
is in your app but in general, there are two ways to create a favicon.
/public
). In this case, you don't have to do anything in your code. (does not work in seamonkey, works in all other browsers I know)Place a link
element in the code of your master view:
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/relative/path/to/file.ico" />