-1

I'm having a similar issue to this question, but none of the solutions are working for me.

In my Rails 4.0.3 app, I consistently get the following error:

 ActionController::RoutingError (No route matches [GET] "/assets/javascripts/underscore-min.map")
 vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.0.229/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
  vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.0.229/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'

I will also occasionally get similar errors when trying to load other assets (images, etc.), but not for all images; this one is the most consistent. This problem occurs on my local server, in the development environment.

I've tried setting config.serve_static_assets = true in my development.rb file, as well as config.serve_static_files in case there's a Rails version issue. I've also tried running rake assets:precompile.

If anyone has any ideas, I'd greatly appreciate it!

Community
  • 1
  • 1

1 Answers1

4

Every JavaScript contains sourcemaps file. So basically this error indicate that our JavaScript's sourcemaps file is not loaded in the asset pipeline. And I don't think we need to load .map file in asset pipeline so you can remove .map file line from your JavaScript file. You can find these code in your javascript file .

 /*
 //@ sourceMappingURL=yourjs.min.js.map
 */

One of the javascript file in your assets pipeline contains this .map file mapping. After removing this line this error will disappear.

Ref: what is .map file

I hope this answer solve your problem

Thanks

Community
  • 1
  • 1
Ajay Barot
  • 1,681
  • 1
  • 21
  • 37
  • Worked like a charm. I commented out the reference to the source map and my problem was fixed. Thank you ABPrime! Also I appreciate the link to reference materials on the subject of .map files. :) – Nicolas Garcia Sep 28 '16 at 13:58
  • @NicolasGarcia: My pleasure. Please accept the answer. – Ajay Barot Sep 28 '16 at 14:10