You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are seeing the Sprockets::Rails::Helper::AssetNotPrecompiledError error, but it doesn't happen all the time, and haven't been able to reproduce it. Sorry this issue is going to sound weird :(, but we are not sure what's causing it, or if it's a problem with our config or something in sprockets/sprockets-rails, so would appreciate any help.
We have a Rails application which includes an engine (named admin). The engine has a Sprockets manifest (admin_manifest, which is appended to the main app's app.config.assets.precompile), and the manifest links a couple css and js directories and trees (which resolve, among other things, to the engine's admin/application.css). Then in the engine's layouts/application.html.erb we do <%= stylesheet_link_tag "admin/application", media: "all" %>, which works fine most of the time (both in development and production), but sometimes it raises a Sprockets::Rails::Helper::AssetNotPrecompiledError error. In production the error persists until we rotate the server (using the same code), but in staging it works correctly after we reload the page.
We are not precompiling assets in production, but we have config.assets.compile enabled, so I wouldn't expect it to cause this error (and if we did precompile, i guess this same problem could happen when running rake assets:precompile so the precompilation would miss some files).
It's like for some reason the app.config.assets.precompile is missing the admin_manifest sometimes, or the admin_manifest is missing parts of its content (we have seen this error both with the admin/application.css, and with other js files, which are included in the application layout after the css, so we assume the css was correctly precompiled in those cases)
Relevant configs:
# main appconfig.cache_classes=trueconfig.assets.compile=true
We are seeing the
Sprockets::Rails::Helper::AssetNotPrecompiledError
error, but it doesn't happen all the time, and haven't been able to reproduce it. Sorry this issue is going to sound weird :(, but we are not sure what's causing it, or if it's a problem with our config or something in sprockets/sprockets-rails, so would appreciate any help.We have a Rails application which includes an engine (named admin). The engine has a Sprockets manifest (
admin_manifest
, which is appended to the main app'sapp.config.assets.precompile
), and the manifest links a couple css and js directories and trees (which resolve, among other things, to the engine'sadmin/application.css
). Then in the engine'slayouts/application.html.erb
we do<%= stylesheet_link_tag "admin/application", media: "all" %>
, which works fine most of the time (both in development and production), but sometimes it raises aSprockets::Rails::Helper::AssetNotPrecompiledError
error. In production the error persists until we rotate the server (using the same code), but in staging it works correctly after we reload the page.We are not precompiling assets in production, but we have
config.assets.compile
enabled, so I wouldn't expect it to cause this error (and if we did precompile, i guess this same problem could happen when runningrake assets:precompile
so the precompilation would miss some files).It's like for some reason the
app.config.assets.precompile
is missing theadmin_manifest
sometimes, or theadmin_manifest
is missing parts of its content (we have seen this error both with theadmin/application.css
, and with other js files, which are included in the application layout after the css, so we assume the css was correctly precompiled in those cases)Relevant configs:
Gem versions:
rails: 7.0.3.1
sprockets-rails: 3.4.2
sprockets: 4.1.1
Stacktrace:
The text was updated successfully, but these errors were encountered: