Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 for /assets/bootstrap.js.map #124

Closed
PascalTurbo opened this issue Oct 22, 2017 · 4 comments
Closed

404 for /assets/bootstrap.js.map #124

PascalTurbo opened this issue Oct 22, 2017 · 4 comments
Labels

Comments

@PascalTurbo
Copy link

I've added bootsrap gem to an existing rails application. In browser I get a 404 for the /assets/bootstrap.js.map file.

ActionController::RoutingError (No route matches [GET] "/assets/bootstrap.js.map"):

actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:11:in `block in call'
activesupport (5.1.4) lib/active_support/logger_silence.rb:20:in `silence'
activesupport (5.1.4) lib/active_support/logger.rb:63:in `block (3 levels) in broadcast'
activesupport (5.1.4) lib/active_support/logger_silence.rb:20:in `silence'
activesupport (5.1.4) lib/active_support/logger.rb:61:in `block (2 levels) in broadcast'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:11:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.3) lib/rack/method_override.rb:22:in `call'
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
railties (5.1.4) lib/rails/engine.rb:522:in `call'
puma (3.10.0) lib/puma/configuration.rb:225:in `call'
puma (3.10.0) lib/puma/server.rb:605:in `handle_request'
puma (3.10.0) lib/puma/server.rb:437:in `process_client'
puma (3.10.0) lib/puma/server.rb:301:in `block in run'
puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
@trentclowater
Copy link

It looks like the line in tasks/updater/js.rb that should have removed the source map annotations:

content = content.sub(%r{^//# sourceMappingURL=.*\n?\z}, '')

didn't actually do that for the beta2 release, for some reason.

@glebm glebm added the bug label Oct 23, 2017
@glebm
Copy link
Member

glebm commented Oct 23, 2017

I'll release a patched version.
In the meantime, use //= require bootstrap-sprockets instead of //= require bootstrap as a workaround.

glebm added a commit that referenced this issue Oct 23, 2017
@glebm
Copy link
Member

glebm commented Oct 23, 2017

Released 4.0.0.beta2.1 with this fix

@glebm glebm closed this as completed Oct 23, 2017
@fabOnReact
Copy link

@glebm @PascalTurbo I had the same problem in production and I solved like this. I am not using the gem, but I installed bootstrap4 from source using yarn

screenshot from 2017-12-14 09-24-25

I run RAILS_ENV=production bundle exec rake assets:precompile and the problem was solved..

bye
fabrizio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants