Adding icon to rails application

后端 未结 5 1701
悲哀的现实
悲哀的现实 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:48

    Put the favicon.ico under your public/ folder and then add <%= favicon_link_tag '/favicon.ico' %> to your

    Then if you try it and doesn't work out, even after you cleaning browser's cache, you should try run the server at a different port. By default, rails runs the server at port 3000.

    Try changing the port to something you haven’t used before – run the app as:

    RAILS 3: rails server -p 12345

    RAILS 1/2: ruby script/server -p 12345

提交回复
热议问题