ActionController::RoutingError (No route matches [GET] “/favicon.ico”) in Rails

后端 未结 4 773
我在风中等你
我在风中等你 2021-01-31 03:09

I have tried to use

 

as well as this



        
4条回答
  •  萌比男神i
    2021-01-31 03:41

    Putting favicon.ico in my public folder wasn't working, so I combined some of the other answers to come up with this simple working method.

    Copy the output of favicon_link_tag and inject image_path like so:

    " rel="shortcut icon" type="image/vnd.microsoft.icon" />
    

    Now place favicon.ico in your assets/images folder and you're set.

提交回复
热议问题