Im getting timeout errors while loading assets dynamically.

ERROR:
FATAL -- : Rack::Timeout::RequestTimeoutException (Request ran for longer than 15000ms):

Code snippet to load assets dynamically(application.html.erb):

stylesheet_link_tag params[:controller] if (Rails.application.assets || ::Sprockets::Railtie.build_environment(Rails.application)).find_asset("#{params[:controller]}.css")
= javascript_include_tag params[:controller] if (Rails.application.assets || ::Sprockets::Railtie.build_environment(Rails.application)).find_asset("#{params[:controller]}.js")

could you please suggest what can be done to fix the timeout error.

1

There are 1 best solutions below

0
On

I fix this issue by removing in your Gemfile: gem 'rack-timeout' after that, run bundle to uninstall it, and then restart the server by running the rails s.

I'm waiting that this suggestion is helpful for you.