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

README Suggestion for sassc LoadError #53

Open
swillits opened this issue Jan 17, 2024 · 1 comment
Open

README Suggestion for sassc LoadError #53

swillits opened this issue Jan 17, 2024 · 1 comment

Comments

@swillits
Copy link

The README should/could also point out specifically that a reason for receiving

`LoadError: cannot load such file -- sassc`

… is that Sprockets could not find the css file being requested. That could be because:

  1. Rails.application.config.dartsass.builds isn't configured to produce a file with the requested name.
  2. The file wasn't built. (Because dartsass:build wasn't called, or locally dartsass:watch isn't running for example.)

As an example:

<%= stylesheet_link_tag "site" %>

# With the configuration:
Rails.application.config.dartsass.builds = {
    "application.scss" => "application.css",
}

Sprockets will not find the file 'application.css' in any of the locations specified in mainfest.js (it's not in the app/assets/builds folder) and so Sprockets will apparently try to use the sassc part of the pipeline to find and build it the old way. Since sassc isn't installed, that results in a load error.

@nimmolo
Copy link

nimmolo commented Apr 22, 2024

Related to #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants