Adding icon to rails application

后端 未结 5 1700
悲哀的现实
悲哀的现实 2020-11-30 02:58

How can I add an icon to my Rails application (to show in tabs when opened in a browser, etc.)?

5条回答
  •  生来不讨喜
    2020-11-30 03:30

    After reading and trying all this answers without success I ended up doing this

    1. Add a file favicon.png to your public/assets folder
    2. In your $/app/views/layouts/application.html.erb modify the content of the tag adding this

    No need to change the web_server configuration file (nginx, apache, etc) no need to precompile the assets.

    Just stop and run/debug your web site, clear the cache from your browser and reopen the page. It should work

提交回复
热议问题