Search code examples
ruby-on-railsasset-pipelineassets

Cannot load assets in dev mode on rails app : ERR_CONNECTION_REFUSED


I just started working on a new rails app that was developed by another developper and I must take on the projet. I am experiencing difficulty at the setup level when simply trying to run the app locally in dev mode. The app doesnt manage to load the assets (css, js, images). I get a ERR_CONNECTION_REFUSED for every asset file : enter image description here

I must add that the project is using the

gem 'asset_sync', '~> 1.0.0'

which is used to synchronises Assets between Rails and S3 but which, I think, should not play any role in dev mode.

Do you know why the assets are not loaded by the app in dev mode ?


Solution

  • From the screenshot I saw you are accessing localhost:3000 but your assets are being requested from localhost:5000. May be some server on port 5000 is needed to serve assets ? Can you check if localhost:5000 is accessible and is running some server that can serve your assets.