1

Is it possible to import vendored css from gem with cssbundling ? If yes, how ?

For example :

Gemfile gem 'semantic-ui-sass'

application.scss @import "semantic-ui/collections/menu";

Gives me Error: Can't find stylesheet to import. with sass compiler

Kevin
  • 65
  • 5
  • What you do is actually the recommended install: https://github.com/doabit/semantic-ui-sass . Have you done a `bundle install` after adding the gem to your gemfile ? Do a `bundle list` in console and check `semantic-ui-sass` is indeed there. – Maxence May 17 '22 at 19:52
  • Yes the gem is well installed. I move from sprocket (with Rails 6) to css-bundling (with Rails 7) – Kevin May 18 '22 at 08:01
  • Does it work if you keep the Sprockets gem in your Gemfile ? – Maxence May 18 '22 at 08:07
  • Sprockets is already present – Kevin May 19 '22 at 07:26
  • Last think I am thinking of if you don't have the 'sassc' gem and your environment file using "scss" : `config.assets.css_compressor = :scss`. Sprockets may not be finding the stylesheet as it would look for .css sinstead of .scss in case SCSS is not enabled. – Maxence May 20 '22 at 05:08
  • Help! I'm hitting the same issue here. Trying to import active_admin sass files and it's not working with rails 7. – dtbaker Feb 05 '23 at 14:19

0 Answers0