Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@import not working with sassc/scssc processor for gem libraries #329

Open
dagi3d opened this issue Jun 26, 2016 · 2 comments
Open

@import not working with sassc/scssc processor for gem libraries #329

dagi3d opened this issue Jun 26, 2016 · 2 comments
Labels

Comments

@dagi3d
Copy link

dagi3d commented Jun 26, 2016

The @import directive is not working if I try to load a stylesheet from a gem using the sassc/scssc processor:

application.scss:
@import 'bootstrap';

asset_pipeline.rb:

Sprockets::Helpers.configure do |config|
  require 'sprockets/sassc_processor'
  assets.register_transformer 'text/scss', 'text/css', Sprockets::ScsscProcessor.new

I get this error:

Error: File to import not found or unreadable: bootstrap 

If I just leave the default processor, it works. On the other hand, I found a workaround to make it work by setting an additional asset_path:

assets.append_path(File.join(Gem::Specification.find_by_name('bootstrap-sass').gem_dir, 'assets/stylesheets')
@schneems
Copy link
Member

I'm currently working on sassc support. There's some bugs. Right now i'm trying to get sassc-rails working with sprockets 4 sass/sassc-rails#65 after that i'm looking to get the SasscProcessor working and then hopefully get sass-rails to auto default to sassc when it's present and Sprockets 4 is being used. I don't have a timeline for those fixes but that's the gameplan.

@schneems
Copy link
Member

I never fixed sassc, i think it's not going to ship with sprockets 4. No clue what's wrong. In the mean time you can use the sassc-rails gem.

@schneems schneems added the bug label Nov 17, 2017
namukang pushed a commit to namukang/dskang.com that referenced this issue Jan 20, 2019
bootstrap 4.2 uses the sassc gem which leads to an error when
trying to import bootstrap.
Perhaps related: rails/sprockets#329
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants