Closed estebanz01 closed 2 years ago
I'm handling all the compilation via webpack, so that's why I reported this, btw 😀 .
Could you check if you have rails_admin.scss
somewhere in your asset path?
If no, I want to know what file triggered that loading of sassc. That'll be possible by attaching a debugger around here and inspecting the value of input[:filename]
, I guess...
https://github.com/rails/sprockets/blob/v4.1.1/lib/sprockets/sassc_processor.rb#L31
I tried to reproduce this error without luck so I'm going to close it (frustrating too much? 🙃 ).
I had issues with my dev machine so I lost my testing repo, when trying to replicate it rom scratch, I couldn't trigger this. Thanks anyway.
@mshibuya I do have rails_admin.scss in my assets/stylesheets path and I am encountering the same issue. Is there anything that I can do to fix it?
How do you build RailsAdmin assets? What's the value of config.asset_source
?
@mshibuya I was able to fix it by adding gem "sassc-rails"
and running yarn build:css
manually. Thanks for your prompt help!
Describe the bug When trying to access rails admin configured with
jsbundling-rails
(webpack
) andcssbundling-rails
(sass
) it still requiressassc
gem.Reproduction steps With a configured rails admin, go to
/admin
.Expected behavior It should try to load the rails admin engine as expected.
Additional context
rails
version: 7.0.3 with--minimal
.rails_admin
version: 3.1.0.beta.rails_admin
npm package version: 3.1.0.betazeitwerk (2.6.0) lib/zeitwerk/kernel.rb:35:in'
sprockets (4.1.1) lib/sprockets/processor_utils.rb:33:in
require' zeitwerk (2.6.0) lib/zeitwerk/kernel.rb:35:in
require'sprockets (4.1.1) lib/sprockets/autoload/sassc.rb:2:in
<top (required)>' zeitwerk (2.6.0) lib/zeitwerk/kernel.rb:35:in
require'zeitwerk (2.6.0) lib/zeitwerk/kernel.rb:35:in
require' sprockets (4.1.1) lib/sprockets/sassc_processor.rb:42:in
initialize' sprockets (4.1.1) lib/sprockets/sassc_processor.rb:27:innew' sprockets (4.1.1) lib/sprockets/sassc_processor.rb:27:in
instance' sprockets (4.1.1) lib/sprockets/sassc_processor.rb:31:incall' sprockets (4.1.1) lib/sprockets/processor_utils.rb:84:in
call_processor' sprockets (4.1.1) lib/sprockets/processor_utils.rb:66:inblock in call_processors' sprockets (4.1.1) lib/sprockets/processor_utils.rb:65:in
reverse_each' sprockets (4.1.1) lib/sprockets/processor_utils.rb:65:incall_processors' sprockets (4.1.1) lib/sprockets/processor_utils.rb:22:in
block incall' sprockets (4.1.1) lib/sprockets/processor_utils.rb:84:in
call_processor' sprockets (4.1.1) lib/sprockets/processor_utils.rb:66:inblock in call_processors' sprockets (4.1.1) lib/sprockets/processor_utils.rb:65:in
reverse_each' sprockets (4.1.1) lib/sprockets/processor_utils.rb:65:incall_processors' sprockets (4.1.1) lib/sprockets/loader.rb:182:in
load_from_unloaded' sprockets (4.1.1) lib/sprockets/loader.rb:59:inblock in load' sprockets (4.1.1) lib/sprockets/loader.rb:337:in
fetch_asset_from_dependency_cache' sprockets (4.1.1) lib/sprockets/loader.rb:43:inload' sprockets (4.1.1) lib/sprockets/cached_environment.rb:44:in
block in load' sprockets (4.1.1) lib/sprockets/cached_environment.rb:44:infetch' sprockets (4.1.1) lib/sprockets/cached_environment.rb:44:in
load' sprockets (4.1.1) lib/sprockets/bundle.rb:27:incall' sprockets (4.1.1) lib/sprockets/processor_utils.rb:84:in
call_processor' sprockets (4.1.1) lib/sprockets/processor_utils.rb:66:inblock in call_processors' sprockets (4.1.1) lib/sprockets/processor_utils.rb:65:in
reverse_each' sprockets (4.1.1) lib/sprockets/processor_utils.rb:65:incall_processors' sprockets (4.1.1) lib/sprockets/loader.rb:182:in
load_from_unloaded' sprockets (4.1.1) lib/sprockets/loader.rb:59:inblock in load' sprockets (4.1.1) lib/sprockets/loader.rb:337:in
fetch_asset_from_dependency_cache' sprockets (4.1.1) lib/sprockets/loader.rb:43:inload' sprockets (4.1.1) lib/sprockets/cached_environment.rb:44:in
block in load' sprockets (4.1.1) lib/sprockets/cached_environment.rb:44:infetch' sprockets (4.1.1) lib/sprockets/cached_environment.rb:44:in
load' sprockets (4.1.1) lib/sprockets/base.rb:81:infind_asset' sprockets (4.1.1) lib/sprockets/base.rb:119:in
[]' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:358:infind_asset' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:337:in
digest_path' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:326:inasset_path' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:103:in
block in resolve_asset_path' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:243:inblock in resolve_asset' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:242:in
each' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:242:indetect' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:242:in
resolve_asset' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:102:inresolve_asset_path' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:80:in
compute_asset_path' actionview (7.0.3) lib/action_view/helpers/asset_url_helper.rb:203:inasset_path' actionview (7.0.3) lib/action_view/helpers/asset_url_helper.rb:348:in
stylesheet_path' actionview (7.0.3) lib/action_view/helpers/asset_tag_helper.rb:180:inblock in stylesheet_link_tag' actionview (7.0.3) lib/action_view/helpers/asset_tag_helper.rb:179:in
map' actionview (7.0.3) lib/action_view/helpers/asset_tag_helper.rb:179:instylesheet_link_tag' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:186:in
block in stylesheet_link_tag' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:184:inmap' sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:184:in
stylesheet_link_tag' rails_admin (3.1.0.beta) app/views/layouts/rails_admin/_head.html.erb:16 actionview (7.0.3) lib/action_view/base.rb:244:inpublic_send' actionview (7.0.3) lib/action_view/base.rb:244:in
_run' actionview (7.0.3) lib/action_view/template.rb:157:inblock in render' activesupport (7.0.3) lib/active_support/notifications.rb:206:in
block in instrument' activesupport (7.0.3) lib/active_support/notifications/instrumenter.rb:24:ininstrument' activesupport (7.0.3) lib/active_support/notifications.rb:206:in
instrument' actionview (7.0.3) lib/action_view/template.rb:361:ininstrument_render_template' actionview (7.0.3) lib/action_view/template.rb:155:in
render' actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:251:inblock in render_partial_template' activesupport (7.0.3) lib/active_support/notifications.rb:206:in
block in instrument' activesupport (7.0.3) lib/active_support/notifications/instrumenter.rb:24:ininstrument' activesupport (7.0.3) lib/active_support/notifications.rb:206:in
instrument' actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:246:inrender_partial_template' actionview (7.0.3) lib/action_view/renderer/partial_renderer.rb:237:in
render' actionview (7.0.3) lib/action_view/renderer/renderer.rb:81:inrender_partial_to_object' actionview (7.0.3) lib/action_view/renderer/renderer.rb:53:in
render_partial' actionview (7.0.3) lib/action_view/helpers/rendering_helper.rb:44:inrender' rails_admin (3.1.0.beta) app/views/layouts/rails_admin/application.html.erb:4 actionview (7.0.3) lib/action_view/base.rb:244:in
public_send' actionview (7.0.3) lib/action_view/base.rb:244:in_run' actionview (7.0.3) lib/action_view/template.rb:157:in
block in render' activesupport (7.0.3) lib/active_support/notifications.rb:206:inblock in instrument' activesupport (7.0.3) lib/active_support/notifications/instrumenter.rb:24:in
instrument' activesupport (7.0.3) lib/active_support/notifications.rb:206:ininstrument' actionview (7.0.3) lib/action_view/template.rb:361:in
instrument_render_template' actionview (7.0.3) lib/action_view/template.rb:155:inrender' actionview (7.0.3) lib/action_view/renderer/template_renderer.rb:76:in
block in render_with_layout' activesupport (7.0.3) lib/active_support/notifications.rb:206:inblock in instrument' activesupport (7.0.3) lib/active_support/notifications/instrumenter.rb:24:in
instrument' activesupport (7.0.3) lib/active_support/notifications.rb:206:ininstrument' actionview (7.0.3) lib/action_view/renderer/template_renderer.rb:74:in
render_with_layout' actionview (7.0.3) lib/action_view/renderer/template_renderer.rb:59:inrender_template' actionview (7.0.3) lib/action_view/renderer/template_renderer.rb:11:in
render' actionview (7.0.3) lib/action_view/renderer/renderer.rb:61:inrender_template_to_object' actionview (7.0.3) lib/action_view/renderer/renderer.rb:29:in
render_to_object' actionview (7.0.3) lib/action_view/rendering.rb:117:inblock in _render_template' actionview (7.0.3) lib/action_view/base.rb:270:in
in_rendering_context'etc...