先把在制作工具中制作的favicon.ico存放在assets/images的根目录 然后在前台代码的head部分添加如下语句: <%= favicon_link_tag image_path("favicon.ico") %>