jwhitley / requirejs-rails

RequireJS support for your Rails 3 or 4 application
MIT License
592 stars 202 forks source link

sprockets-rails >= 3 throws "Asset was not declared to be precompiled in production" #262

Open leppert opened 8 years ago

leppert commented 8 years ago

See also: https://github.com/rails/sprockets-rails/issues/297

mccallumjack commented 8 years ago

We were getting the same error but setting config.check_precompiled_asset = false solved it.

This was added to sprockets-rails recently in commit: https://github.com/rails/sprockets-rails/commit/b4f9006c7ff5ccd74b467c1b81e721c15dd5daf7

kevinluo201 commented 3 years ago

Rails.application.config.assets.precompile += Rails.application.config.requirejs.user_config['modules'].map { |m| "#{m['name']}.js" } Do you think this workaround reasonable?