Ad

Rails, Favicon.ico Not Found

- 1 answer

This is soo odd, I've been receiving:

ActionController::RoutingError (No route matches "/favicon.ico")

but I have the favicon.ico in my public directory... any ideas how to solve this? Nginx doesn't throw an error at all.

Ad

Answer

It seems that nginx doesn't handle your static assets (since this request for static file goes to the ActionController). Check public root in nginx config file nginx.conf. Here is an example with Capistrano deployments:

server {
  listen       80;
  root /var/www/my_project/current/public;
}

And do you use a favicon_link_tag helper in your head :) ?

Ad
source: stackoverflow.com
Ad