Search code examples
htmlruby-on-railshamlfavicon

My favicon icon is not working in rails site


OK I am trying to get my favicon working on my site: Hidden for privacy For some reason it isn't showing. I am using haml and have this in my header...

= favicon_link_tag "favicon.ico"

It is also producing the html...

<link href="/assets/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />

I do have a favicon.ico in my assets and I am not seeing any issues in my console. Also when I check the source and click the link for the file, it does find it. I have checked every tutorial possible and it doesn't work. I have also tried Safari, Chrome, and Internet Explorer. Thanks for any help.


Solution

  • The icon file needs to be under public/assets and clear the browser cache if it still not showing up.

    For more details: Adding Icon to rails website?