症状
Railsサーバーを起動して、該当のURLにアクセスしたとき、下記エラーが発生しました。 どうやらfaviconがないと怒られているようです。ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
actionpack (6.0.3.7) lib/action_dispatch/middleware/debug_exceptions.rb:36:in `call'
actionpack (6.0.3.7) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.0.3.7) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.0.3.7) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.0.3.7) lib/active_support/tagged_logging.rb:80:in `block in tagged'
activesupport (6.0.3.7) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (6.0.3.7) lib/active_support/tagged_logging.rb:80:in `tagged'
railties (6.0.3.7) lib/rails/rack/logger.rb:26:in `call'
actionpack (6.0.3.7) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (6.0.3.7) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (6.0.3.7) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.0.3.7) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.0.3.7) lib/action_dispatch/middleware/static.rb:126:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (6.0.3.7) lib/action_dispatch/middleware/host_authorization.rb:82:in `call'
rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
railties (6.0.3.7) lib/rails/engine.rb:527:in `call'
puma (4.3.8) lib/puma/configuration.rb:228:in `call'
puma (4.3.8) lib/puma/server.rb:718:in `handle_request'
puma (4.3.8) lib/puma/server.rb:472:in `process_client'
puma (4.3.8) lib/puma/server.rb:328:in `block in run'
puma (4.3.8) lib/puma/thread_pool.rb:134:in `block in spawn_thread'
解決策
public以下に「favicon.ico」を配置すると、エラーが表示されなくなりました。参考