Skip to content

README Suggestion for sassc LoadError #53

@swillits

Description

@swillits

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions