published under license CC4-BY
posted in category Software Development & Programming / Ruby on Rails
posted at 27. May '24
Leftover SCSS Files
Recently I wanted to get rid of SCSS conversion (since CSS nesting is more less supported https://caniuse.com/css-nesting now), so I removed CSS compression in environment files, but I still got this:
damon@rapthalia:~/oni_sorceress$ bin/rails assets:precompile --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
bin/rails aborted!
LoadError: cannot load such file -- sassc (LoadError)
<internal:/home/damon/.rbenv/versions/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/home/damon/.rbenv/versions/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/damon/.rbenv/versions/3.2.4/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
/home/damon/.rbenv/versions/3.2.4/lib/ruby/gems/3.2.0/gems/sprockets-4.2.1/lib/sprockets/autoload/sassc.rb:2:in `<top (required)>'
<internal:/home/damon/.rbenv/versions/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/home/damon/.rbenv/versions/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/damon/.rbenv/versions/3.2.4/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
/home/damon/.rbenv/versions/3.2.4/lib/ruby/gems/3.2.0/gems/sprockets-4.2.1/lib/sprockets/sassc_processor.rb:42:in `initialize'
/home/damon/.rbenv/versions/3.2.4/lib/ruby/gems/3.2.0/gems/sprockets-4.2.1/lib/sprockets/sassc_processor.rb:27:in `new'
/home/damon/.rbenv/versions/3.2.4/lib/ruby/gems/3.2.0/gems/sprockets-4.2.1
So sprockets will try to load sassc
once it sees it should compile an .scss
file.
The reson is I had .scss
files in app/assets/
directory. I had to get rid of them (rename to .css
) and the error got resolved.
Add Comment