Mason SB
Mason SB

Reputation: 525

remove sassc rails 7

I have a rails 7 application I created with tailwind css. Custom font wasn't working in production, so I added gem rails-sassc and converted the application.css to .scss. Ended up reverting the changes, but now on local I get

"cannot load such file -- sassc"

I have removed the gem, deleted gemfile.lock, inspected gem info, but I still get the same error. I have even tried rolling back to an earlier commit.

Also tried adding config.assets.css_compressor = nil to my application.rb

In the traceback I see there is reference to sprockets (4.0.3) lib/sprockets/autoload/sassc.rb:2:in '` I assume this is something on my local, but not sure how to remove it. Any help would be appreciated.

Beginning of logs

 Rendered layout layouts/application.html.erb (Duration: 27.7ms | Allocations: 37919)
Completed 500 Internal Server Error in 32ms (ActiveRecord: 0.0ms | Allocations: 41345)


  
LoadError (cannot load such file -- sassc):
  
bootsnap (1.12.0) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require'
bootsnap (1.12.0) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require'
zeitwerk (2.5.4) lib/zeitwerk/kernel.rb:35:in `require'
sprockets (4.0.3) lib/sprockets/autoload/sassc.rb:2:in `<main>'
bootsnap (1.12.0) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bootsnap (1.12.0) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
zeitwerk (2.5.4) lib/zeitwerk/kernel.rb:35:in `require'
sprockets (4.0.3) lib/sprockets/sassc_processor.rb:42:in `initialize'
sprockets (4.0.3) lib/sprockets/sassc_processor.rb:27:in `new'
sprockets (4.0.3) lib/sprockets/sassc_processor.rb:27:in `instance'

Upvotes: 5

Views: 1960

Answers (1)

Mason SB
Mason SB

Reputation: 525

I hope no one makes the same mistake as I have....

Solution:

rails tmp:clear 

Source: assets:precompile results in LoadError: cannot load such file -- sassc

Upvotes: 8

Related Questions