I am getting the following error for several of my assets in my Rails app.
ActionController::RoutingError (No route matches [GET] "/assets/jquery-1.10.2.min.map")
Can anyone shed some light on where the ".map" is coming from and why? Thanks in advance.
To compile your assets locally, run the assets:precompile task locally on your app. Make sure to use the production environment so that the production version of your assets are generated. A public/assets directory will be created. Inside this directory you'll find a manifest.
The require_tree directive tells Sprockets to recursively include all JavaScript files in the specified directory into the output. These paths must be specified relative to the manifest file.
rake assets:clean Only removes old assets (keeps the most recent 3 copies) from public/assets . Useful when doing rolling deploys that may still be serving old assets while the new ones are being compiled.
Sprockets is a crucial Ruby library that is used to serve and compile web assets. However, in Rails 7.0 the library becomes an optional dependency unless the application needs to use Sprockets. In such situations, the sprockets-rails gem will have to be added to the Gemfile .
It's related to the new source map support that started shipping in jQuery 1.9RC1.
You can either follow the directions from the 1.9RC1 link and add the compressed, uncompressed, and map files to your vendor/assets
directory or remove the source map line from the uncompressed file (it looks like //@ sourceMappingURL=jquery-1.10.2.min.map
).
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With