GithubHelp home page GithubHelp logo

rails / dartsass-rails Goto Github PK

View Code? Open in Web Editor NEW
203.0 11.0 40.0 15.42 MB

Integrate Dart Sass with the asset pipeline in Rails

License: MIT License

Dockerfile 22.62% Ruby 73.16% Shell 4.16% SCSS 0.06%

dartsass-rails's Introduction

Dart Sass for Rails

Sass is a stylesheet language that’s compiled to CSS. It allows you to use variables, nested rules, mixins, functions, and more, all with a fully CSS-compatible syntax.

This gem wraps the standalone executable version of the Dart version of Sass. The platform specific Dart Sass executables are distributed by sass-embedded gem.

The installer will create your default Sass input file in app/assets/stylesheets/application.scss. This is where you should import all the style files to be compiled using the @use rule. When you run rails dartsass:build, this input file will be used to generate the output in app/assets/builds/application.css. That's the output CSS that you'll include in your app. The load path for Sass is automatically configured to be app/assets/stylesheets.

If you need to configure the build process – beyond configuring the build files – you can run bundle exec dartsass to access the platform-specific executable, and give it your own build options.

When you're developing your application, you want to run Dart Sass in watch mode, so changes are automatically reflected in the generated CSS output. You can do this either by running rails dartsass:watch as a separate process, or by running ./bin/dev which uses foreman to start both the Dart Sass watch process and the rails server in development mode.

Installation

  1. Run ./bin/bundle add dartsass-rails
  2. Run ./bin/rails dartsass:install

Building in production

The dartsass:build is automatically attached to assets:precompile, so before the asset pipeline digests the files, the Dart Sass output will be generated.

Configuring builds

By default, only app/assets/stylesheets/application.scss will be built. If you'd like to change the path of this stylesheet, add additional entry points, or customize the name of the built file, use the Rails.application.config.dartsass.builds configuration hash.

# config/initializers/dartsass.rb
Rails.application.config.dartsass.builds = {
  "app/index.sass"  => "app.css",
  "site.scss"       => "site.css"
}

The hash key is the relative path to a Sass file in app/assets/stylesheets/ and the hash value will be the name of the file output to app/assets/builds/.

If both the hash key and the hash value are directories instead of files, it configures a directory to directory compliation, which compiles all public Sass files whose filenames do not start with underscore (_).

# config/initializers/dartsass.rb
Rails.application.config.dartsass.builds = {
  "." => "."
}

Configuring build options

By default, sass is invoked with ["--style=compressed", "--no-source-map"]. You can adjust these options by overwriting Rails.application.config.dartsass.build_options.

# config/initializers/dartsass.rb
Rails.application.config.dartsass.build_options << "--no-charset" << "--quiet-deps"

Importing assets from gems

dartsass:build includes application assets paths as Sass load paths. Assuming the gem has made assets visible to the Rails application, no additional configuration is required to use them.

Migrating from sass-rails

If you're migrating from sass-rails (applies to sassc-rails as well) and want to switch to dartsass-rails, follow these instructions below:

  1. Remove the sass-rails gem from the Gemfile by running

    ./bin/bundle remove sass-rails
    
  2. Install dartsass-rails by following the Installation instructions above

  3. Remove any references to Sass files from the Sprockets manifest file: app/assets/config/manifest.js

  4. In your continuous integration pipeline, before running any tests that interact with the browser, make sure to build the Sass files by running:

    bundle exec rails dartsass:build
    

Troubleshooting

Some common problems experienced by users:

LoadError: cannot load such file -- sassc

The reason for the above error is that Sprockets is trying to build Sass files but the sass-rails or sassc-rails gems are not installed. This is expected, since Dart Sass is used instead to build Sass files, and the solution is to make sure that Sprockets is not building any Sass files.

There are three reasons why this error can occur:

Sass files are referenced in the Sprockets manifest file

If any Sass files are referenced in the Sprockets manifest file (app/assets/config/manifest.js) Sprockets will try to build the Sass files and fail.

Solution

Remove any references to Sass files from the Sprockets manifest file. These are now handled by Dart Sass. If you have more Sass files than application.scss, make sure these are compiled by Dart Sass (see Configuring builds above).

Running locally

If you receive this error when running the Rails server locally and have already removed any references to Sass files from the Sprockets manifest file, the Dart Sass process is most likely not running.

Solution

Make sure the Dart Sass process is running by starting the Rails server by running: ./bin/dev.

Running continuous integration pipelines

If you receive this error when running tests that interact with the browser in a continuous integration pipeline and have removed any references to Sass files from the Sprockets manifest file, the Sass files have most likely not been built.

Solution

Add a step to the continuous integration pipeline to build the Sass files with the following command: bundle exec rails dartsass:build.

Version

bundle exec dartsass --version

License

Dart Sass for Rails is released under the MIT License. Sass is released under the MIT License.

dartsass-rails's People

Contributors

bekkii77 avatar chipairon avatar dhh avatar fschwahn avatar henrik avatar jacob-carlborg-apoex avatar jessechavez avatar jlm avatar jmckible avatar jonathanhefner avatar marcoroth avatar mdh avatar ntkme avatar rafaelfranca avatar tagcincy avatar vovimayhem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dartsass-rails's Issues

Support for Apple M1

I think dart-sass can be built easily for aarch64-linux (with Docker... for us folks using Docker for Mac) and arm64-darwin platforms... Does it makes sense to include those builds as well in this project?

Files starting with unserscore are built

The readme says

If both the hash key and the hash value are directories instead of files, it configures a directory to directory compliation, which compiles all public Sass files whose filenames do not start with underscore (_).

I am using this configuration

Rails.application.config.dartsass.builds = {
  "." => "."
}

Still, when I run dartsass:build, Sass partials are compiled:

Writing subfolder/_index-adcce2b423a46ddd09284eee05d1033fa794f95a.scss

Run the watcher on a Thread when Rails boots instead of foreman ?

Hello,

This is a idea for an alternative way to run the dartsass watcher without using foreman. I didn't start with a PR to add this because maybe it has some disadvantages I'm unaware of, or it might be unwanted.

So, instead of foreman, I changed my Rails config.ru file to spawn a thread that runs the dartsass watcher instead:

require_relative "config/environment"

if Rails.env.development?
  dart_watcher_thread = Thread.new { system("./bin/rails dartsass:watch") }
  at_exit { dart_watcher_thread.exit }
end

run Rails.application
Rails.application.load_server

For me, this offers a few advantages:

  1. No foreman dependency
  2. Terminal debugging (i.e. pry) still works
  3. Running ./bin/rails server is enough - this is minor, but probably removes some friction for people coming into dartsass and having to now change their usual start server command.

This feels like a better way, but of course I could be missing something. Thoughts?

Built CSS is only picked up by second precompilation

When one runs rake assets:precompile, the dartsass:build task is indeed run before the precompilation task, but it appears that the latter won't pick up assets written to the app/assets/builds folder by the former, unless the files had been present there before startup in the first place.

To reproduce the error:

  1. Create a brand new Rails app, version 7.1.1.
  2. Add dartsass-rails 0.5.0 to the Gemfile and bundle.
  3. Run rails dartsass:install.
  4. Put some styles in app/assets/stylesheets/application.scss.
  5. Have at least one template or layout that does stylesheet_link_tag "application".
  6. Run rake assets:precompile.
  7. Verify that there is an app/assets/builds/application.css file, so dartsass:build has run successfully.
  8. Observe that neither is application-<hash>.css in the Sprockets manifest (public/assets/.sprockets-manifest-*.json), nor has it been packed up in public/assets.
  9. Run rake assets:precompile again.
  10. Observe that the task gave output corresponding to your SCSS file (and any additional assets that were referenced by it that are not referenced by other assets or your manifest.js), but nothing else.
  11. Verify that application-<hash>.css is now in the Sprockets manifest and appears in public/assets as well.

Subsequent runs of rake assets:precompile will not yield any further changes (provided that none of the assets were modified).

FYI: dartsass-sprockets gem released (upgrade of sassc-rails gem)

I've released the following gems:

These gems use sass-embedded under the hood, which provides Ruby native interface for Dart Sass.

The SassC gem maintainers were unresponsive so I went ahead and released a gem to benefit Sprockets users. The code is a bit of kludge at the moment. I'd be glad if Rails team wants to take these over, as the current dartsass-rails gem doesn't seem to gel as well (dartsass:watch and all is too much for a troglodyte developer like me to handle 🦖)

(cc: @xfalcox)

LoadError: cannot load such file -- sassc

running rake assets:precompile ends with the error.
Can't find why it still requires sassc, sassc only was in project when migrated to sprockets 4 using Guide to upgrading from Sprockets 3.x to 4.x:

gem 'sass-rails', '>= 5'
bundle update sass-rails sprockets

and then followed dartsass-rails install documentation.
did:

rails tmp:clear
rake assets:clobber
rake assets:precompile

ruby-3.1.2

gem 'rails', '7.0.3.1'
gem 'webrick'
gem 'sprockets-rails', '~> 3.4', '>= 3.4.2'
gem 'dartsass-rails', '~> 0.4.0'
...

manifest.js file content:

//= link_tree ../images
//= link application.css
//= link application.js
//
//= link_tree ../builds

error log:

** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke dartsass:build (first_time)
** Invoke environment 
** Execute dartsass:build
+ /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dartsass-rails-0.4.0/exe/darwin/sass --style\=compressed --no-source-map --load-path 

/app/assets/stylesheets --load-path 
/app/assets/builds --load-path 
/app/assets/config --load-path 
/app/assets/fonts --load-path 
/app/assets/images --load-path 
/app/assets/javascripts --load-path 
/app/assets/stylesheets --load-path 
/lib/assets/javascripts --load-path 
/lib/assets/stylesheets --load-path 
/vendor/assets/javascripts --load-path 
/vendor/assets/stylesheets --load-path 

/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/flex_calendar-aae0ac1c9b3f/app/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/flex_calendar-aae0ac1c9b3f/app/assets/images --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/flex_calendar-aae0ac1c9b3f/app/assets/stylesheets --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/flex_calendar-aae0ac1c9b3f/lib/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/flatpickr-4.5.7.0/vendor/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/flex_calendar-aae0ac1c9b3f/vendor/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/flatpickr-4.5.7.0/vendor/assets/stylesheets --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/tinymce-rails-5.10.5/app/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/tinymce-rails-5.10.5/app/assets/source --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/tinymce-rails-5.10.5/vendor/assets/config --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/jquery-minicolors-rails-2.2.6.2/vendor/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/tinymce-rails-5.10.5/vendor/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/jquery-minicolors-rails-2.2.6.2/vendor/assets/stylesheets --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/select2-rails-4.0.13/vendor/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/select2-rails-4.0.13/vendor/assets/stylesheets --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/jquery-ui-rails-5.0.5/app/assets/images --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/jquery-ui-rails-5.0.5/app/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/jquery-ui-rails-5.0.5/app/assets/stylesheets --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/jquery-rails-4.2.1/vendor/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/coffee-rails-5.0.0/lib/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/actiontext-7.0.3.1/app/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/actiontext-7.0.3.1/app/assets/stylesheets --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/actioncable-7.0.3.1/app/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activestorage-7.0.3.1/app/assets/javascripts --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/actionview-7.0.3.1/lib/assets/compiled --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/react-rails-1.9.0/lib/assets/react-source/development --load-path 
/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/react-rails-1.9.0/lib/assets/javascripts/ --load-path 
/app/assets/fonts 
/app/assets/stylesheets/application.scss:
/app/assets/builds/application.css
  ** Execute assets:precompile
  rake aborted!
  LoadError: cannot load such file -- sassc
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/autoload/sassc.rb:2:in `<top (required)>'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/sassc_processor.rb:42:in `initialize'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/sassc_processor.rb:27:in `new'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/sassc_processor.rb:27:in `instance'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/sassc_processor.rb:31:in `call'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:84:in `call_processor'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `reverse_each'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `call_processors'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:22:in `block in <class:CompositeProcessor>'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:33:in `call'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:84:in `call_processor'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `reverse_each'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `call_processors'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:182:in `load_from_unloaded'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:59:in `block in load'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:43:in `load'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `block in load'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `fetch'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `load'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/bundle.rb:27:in `call'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:84:in `call_processor'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `reverse_each'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `call_processors'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:182:in `load_from_unloaded'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:59:in `block in load'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:43:in `load'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `block in load'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `fetch'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `load'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/base.rb:81:in `find_asset'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/base.rb:88:in `find_all_linked_assets'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:125:in `each'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:125:in `to_a'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:125:in `block (2 levels) in find'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `block in synchronize'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `synchronize'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `synchronize'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:22:in `execute'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/promise.rb:564:in `block in realize'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:352:in `run_task'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:343:in `block (3 levels) in create_worker'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `loop'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `block (2 levels) in create_worker'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in `catch'
 /.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in `block in create_worker'
  Tasks: TOP => assets:precompile

OS: mac

When I install gem with dependency on sassc-rails (example pdfjs_viewer-rails) and start server with ./bin/dev , then all starts up and works fine.

installs in JRuby and it looks like it shouldn't

It installs on JRuby but when you run the bin/rails dartsass:install command it fails

[...]
Compile initial Dart Sass build
         run  rails dartsass:build from "."
ERROR: dartsass-rails does not support the java operating system

Imports doesn't work on production

Hello,

i have a pretty basic dartsass-rails setup in place. To simplify things - let's say i have an application.scss file with @import 'notyf/notyf.min.css'; inside. While this notyf css file is being properly loaded in dev environment, after doing the release to production - it's not getting precompiled nor apparently even threat differently and precompiled application.css file still has a raw @import 'notyf/notyf.min.css'; line which tries to load this file - it doesn't exist in public folder which means styles are not loaded. Notyf is an external dependency i have defined in my package.json file.

Am i missing something in here? Is that possible to import external dependencies in assets precomiled with dartsass-rails ? Shouldn't dartsass-rails inject imported external stylesheets on precompilation? My dartsass initializer is:

Rails.application.config.dartsass.builds = {
  "." => "."
}

Thanks in advance!

does dartsass-rails support sprockets directives?

Does dartsass-rails support sprockets directives? In my app, when dartsass builds, these directives are being treated as comments (which technically they are!) Just wondering if this is how it's supposed to work. Do we have to use @import or @use now?

/* app/assets/dashboard.css */

/*
 *= require shared/base
 *= require_directory ./dashboard
 */

Issue with Procfile.dev script in windows command line

`$ ./bin/dev

C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in spawn': Exec format error - bin/rails server -p 3000 (Errno::ENOEXEC) from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in block in run'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in chdir' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in run'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:367:in block (2 levels) in spawn_processes' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in upto'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in block in spawn_processes' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in each'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in spawn_processes' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:57:in start'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/cli.rb:42:in start' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/command.rb:27:in run'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/invocation.rb:126:in invoke_command' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor.rb:369:in dispatch'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in start' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/bin/foreman:7:in <top (required)>'
from C:/Ruby30-x64/bin/foreman:25:in load' from C:/Ruby30-x64/bin/foreman:25:in

'
`

webpack had a similar kind of issue rails/webpacker#613 they got around that by adding ruby infront while invoking the task i've tried the similar approach and it worked. added ruby path before executing the command in Procfile.dev

`web: C:/Ruby30-x64/bin/ruby.exe bin/rails server -p 3000

css: C:/Ruby30-x64/bin/ruby.exe bin/rails dartsass:watch`

asset-url and related helpers missing?

It seems the asset-url, asset-path, image-url, and image-path helpers available with sass-rails do not work with this project. Am I correct, or missing something?

If they are missing, I would be happy to propose and work on an implementation.

Thank you for this project, I hope our team is able to adopt it!

Amazon Linux 2023 - slow compilation process and libsass.so saved in wrong place

Firstly, the libsass compilation process is very slow which doesn't play well with Rails app deployments. Why does it compile when dartsass should already include a built-in x86_64 Linux binary?

Anyway, after the deployment, app cannot start because of the following error:

Could not open library '/var/app/current/vendor/bundle/ruby/3.2.0/gems/sassc-2.4.0/ext/libsass.so': /var/app/current/vendor/bundle/ruby/3.2.0/gems/sassc-2.4.0/ext/libsass.so: cannot open shared object file: No such file or directory.

It looks for the file here:

/var/app/current/vendor/bundle/ruby/3.2.0/gems/sassc-2.4.0/ext/libsass.so

But the file is stored here:

/var/app/current/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/sassc-2.4.0/sassc/libsass.so

Can't find stylesheet to import: @import "font-awesome"

I have met a problem to use the gem font-awesome-rails.

The command rails dartsass:build produces an error.

Error: Can't find stylesheet to import.
  ╷
2 │ @import "font-awesome"
  │         ^^^^^^^^^^^^^^
  ╵
  app/assets/stylesheets/application.scss 2:9  root stylesheet
bin/rails aborted!
Command failed with exit 65: /usr/local/rvm/gems/ruby-3.2.3@tv/gems/dartsass-rails-0.5.0/lib/tasks/../../exe/dartsass

I suppose the problem is that the file to be included with @import "font-awesome" from
font-awesome-rails-4.7.0.8/app/assets/stylesheets/font-awesome.css.erb') is of the format .erb and therefore can not be parsed:

$ bec
Loading development environment (Rails 7.2.0.alpha)
3.2.3 :001 > require 'sass-embedded'
 => true
3.2.3 :002 > Sass.compile('/usr/local/rvm/gems/ruby-3.2.3@tv/gems/font-awesome-rails-4.7.0.8/app/assets/stylesheets/font-awesome.css.erb')
Error: expected "(".
   ╷
14 │   src: url('<%= font_path('fontawesome-webfont.eot') %>');
   │                                                   ^
   ╵
  ../../../../font-awesome-rails-4.7.0.8/app/assets/stylesheets/font-awesome.css.erb 14:51  root stylesheet

I do not know, of which gem is the bug. The candidates are:

  • dartsass-rails
  • sass-embedded
  • font-awesome-rails

The whole project that demonstrates the bug is here.

Gem doesn't include executables

The gemspec doesn't include the platform specific executable files so you get this error:

% gem install dartsass-rails
Fetching dartsass-rails-0.1.0.gem
Successfully installed dartsass-rails-0.1.0
1 gem installed
% dartsass
+ ~/.gem/ruby/2.7.5/gems/dartsass-rails-0.1.0/exe/darwin/sass
Traceback (most recent call last):
	3: from ~/.gem/ruby/2.7.5/bin/dartsass:23:in `<main>'
	2: from ~/.gem/ruby/2.7.5/bin/dartsass:23:in `load'
	1: from /Users/andyw/.gem/ruby/2.7.5/gems/dartsass-rails-0.1.0/exe/dartsass:22:in `<top (required)>'
~/.gem/ruby/2.7.5/gems/dartsass-rails-0.1.0/exe/dartsass:22:in `exec': No such file or directory - ~/.gem/ruby/2.7.5/gems/dartsass-rails-0.1.0/exe/darwin/sass (Errno::ENOENT)

assets:precompile on windows

I get "Errno::ENOEXEC: Exec format error" with running ruby bin\rails assets:precompile on windows server 2019, but a few modifications at the end resolve the issue. I hope this would help others trying to work with dartsass-rails on windows platform.

environment:
ruby "3.2.1"
rails "7.0.4.3"
dartsass-rails "0.4.1"

--- dartsass.orig 2023-05-06 00:58:47.588381000 +0900
+++ dartsass 2023-05-06 00:58:57.974602000 +0900
@@ -22,5 +22,8 @@
end

command = Shellwords.join([ exe_path, ARGV ].flatten)
+case platform_string
+when /mswin|mingw|cygwin/ then command.gsub!(/\(?==)/,"")
+end
puts "+ #{command}"
exec(command)

--- build.rake.orig 2023-05-06 00:55:03.661780000 +0900
+++ build.rake 2023-05-06 00:55:10.154173000 +0900
@@ -1,4 +1,4 @@
-EXEC_PATH = "#{Pathname.new(dir).to_s}/../../exe/dartsass"
+EXEC_PATH = "ruby #{Pathname.new(dir).to_s}/../../exe/dartsass"
CSS_LOAD_PATH = Rails.root.join("app/assets/stylesheets")
CSS_BUILD_PATH = Rails.root.join("app/assets/builds")

Don't know how to build task 'assets:clobber'

When I install the dartsass-rails gem, it causes my Rake tasks to break:

$ rails dartsass:install --trace
rails aborted!
Don't know how to build task 'assets:clobber' (See the list of available tasks with `rails --tasks`)
Did you mean?  assets:clean
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task_manager.rb:59:in `[]'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:405:in `[]'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/dartsass-rails-0.3.0/lib/tasks/clobber.rake:9:in `<main>'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/engine.rb:661:in `block in run_tasks_blocks'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/engine.rb:661:in `each'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/engine.rb:661:in `run_tasks_blocks'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/application.rb:504:in `block in run_tasks_blocks'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/engine/railties.rb:15:in `each'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/engine/railties.rb:15:in `each'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/application.rb:504:in `run_tasks_blocks'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/engine.rb:464:in `load_tasks'
/home/fletch/Dropbox/projects/web_apps/questlog/Rakefile:3:in `<main>'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command.rb:51:in `invoke'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands.rb:18:in `<main>'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/fletch/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:4:in `<main>'

It seems to vary. On another project it instead complains Don't know how to build task 'assets:precompile'. Here's an example. You can see it failing the CI build here.

Migration from `sassc-rails` workarounds

It would help enormously if we had better documentation on the incompatibilities with sassc-rails and known workarounds for them. I'm willing to create a README.md or docs/migrating.md PR, but I'd need guidance (and I can't promise when I'll get around to creating it).

Following are my initial thoughts start towards what might be needed in a docs/migrating.md, and the workarounds that I used. 🙂 You can maybe consider it a "rough draft". I would appreciate advice on my workarounds: Can they be simplified or improved? Are they factually inaccurate (I did test them all, but there might be something abnormal in my testing env)? Which ones deserve to be included in a documentation PR? What am I missing?

Glob imports

Imports need to be explicitly enumerated. A simple pattern is to convert all @import "foo/**/*"; glob imports into @import "foo"; and add a new foo/_index.scss file which contains explicit imports for all of the globbed files. If foo/_index.scss already exists, @import "foo/glob"; and foo/_glob.scss could be used instead.

This can be tedious and error-prone to do by hand, so it would be nice to add a find|awk bash one-liner to the documentation. Even nicer would be a dartsass:migrate-globs task.

Require directives

Although sass-rails and sassc-rails both process the sprockets require directives in .scss files, dartsass-rails does not. I found several different workarounds for this. The first two should work with sprockets or propshaft, but the others require sprockets.

Convert to @import

Fortunately, dartsass-rails adds all gem asset paths as load paths for dartsass. So, if the gem is only using basic css or scss, we can generally replace //= require "foo" with @import "foo";

Unfortunately, when the gems themselves rely on sprockets features, this won't work. For example: jquery-ui-rails uses sprockets require directives. And font-awesome-rails uses erb to process a .css.erb file. Other gems may have other incompatibilities.

Convert to node packages

In many cases, a node package exists for the library in question. In that case, the simplest approach may be to convert from the bundled gems to the node package. The @import statement may need to use the full path to the stylesheet, relative to node_modules. E.g: //= require "jquery-ui" might be converted to @import 'jquery-ui/dist/themes/base/jquery-ui.min';. Alternatively, the path to the node package's dist directory could be added to config.assets.paths.

However, in some cases, the node packages require non-trivial changes to the application code, or the gems are significantly simpler to use, or the gems come with additional functionality such as image assets and helper modules. In those cases, the next two workarounds will probably work.

Use a sprockets css entrypoint to require dartsass build output

Add a prefix or suffix to the entrypoint with the problematic require directives. Add this new file to the config.dartsass.builds hash. Remove the sprockets requires from the top, to avoid confusion (optional, they are comments so they're simply ignored).

Create a new .css file with the same base name as the original entrypoint (only changing the extension from .scss to .css). Add this file to either config.assets.precompile or manifest.js. Copy all of the original require directives into this file (nothing else). Add a require directive for the renamed .scss file at the bottom of this css file--or if require self was used, replace that. Once dartsass has run and written to app/assets/builds, the new sprockets entrypoint should be able to work just like before.

Use new entrypoints and new stylesheet_link_tags

Convert the = require that work into @import. The problematic imports can mostly be discovered by simply converting them all and then commenting out the ones that don't work until dartsass:build runs without errors.

  • For each problematic import:
    • add the built name to config.assets.precompile. Sprockets precompiles these entrypoints using the asset paths and manifests of all loaded rails engines (gems).
    • Above every stylesheet_link_tag for the existing entrypoint, add a stylesheet_link_tag for each of these new entrypoints.
  • CSS ordering is significant and this moves the sprockets processed stylesheets to first. If that breaks the styles, create more entrypoints in either dartsass or sprockets as needed.

Examples

The examples are based on the following hypothetical broken scss:

// app/assets/stylesheets/admin.scss
/*
 *= require "bootstrap"  
 *= require "bootstrap-responsive"
 *= require "font-awesome"  
 *= require "jquery-ui"
 *= require "something-else-etc-etc"  
 */

.my.awesome.scss.styles {}
.etc .etc .etc {}
# config/initializers/assets.rb
config.dartsass.builds = { "admin.scss" => "admin.css" }
<%# app/views/layouts/admin.html.erb %>
<%= stylesheet_link_tag "admin", media: "all" %>

Use a sprockets css entrypoint to require dartsass build output

The example could be converted to something like the following:

// app/assets/stylesheets/admin.css
/*
 *= require "bootstrap"  
 *= require "bootstrap-responsive"
 *= require "font-awesome"  
 *= require "jquery-ui"
 *= require "something-else-etc-etc"  
 *= require "admin-scss"  
 */
// EOF
// app/assets/stylesheets/admin-scss.scss
.my.awesome.scss.styles {}
.etc .etc .etc {}
# config/initializers/assets.rb
config.assets.precompile += %w[admin.scss]
config.dartsass.builds = { "admin-scss.scss" => "admin-scss.css" }

The erb would be unchanged.

Use new entrypoints and new stylesheet_link_tags

The example would be converted to something like the following:

// app/assets/stylesheets/base-layout.scss
@import "bootstrap";
@import "bootstrap-responsive";
// app/assets/stylesheets/admin.scss
@import "something-else-etc-etc";

.my.awesome.scss.styles {}
.etc .etc .etc {}
# config/initializers/assets.rb
config.assets.precompile += %w[
  font-awesome.css
  jquery-ui.css
]
config.dartsass.builds = {
  "base-layout" => "base-layout.css"
  "admin-scss.scss" => "admin-scss.css"
}
<%# app/views/layouts/admin.html.erb %>
<%= stylesheet_link_tag "base-layout", media: "all" %>
<%= stylesheet_link_tag "font-awesome", media: "all" %>
<%= stylesheet_link_tag "jquery-ui", media: "all" %>
<%= stylesheet_link_tag "admin", media: "all" %>

Provide bundled dartsass binary

Given how commonly SASS is used in Rails app, it would be great if dartsass-rails could be "batteries included" in terms of having a binary packaged with the gem. It would be fine to do as a sub-gem as well. This was the case with the old sass-ruby and sassc-ruby gems.

`cannot load such file -- sassc` in spec and first load of dev page

I have built two new rails 7.0.4 apps (ruby ruby 3.1.3p185) in the last couple of days, and with both of them I am getting cannot load such file -- sassc errors when I run request specs. I also notice that when I run the apps locally (via rails s) the error occurs on first attempt to load my home page. However, if I refresh the page twice the page renders successfully.

With the latest app I have only created a home controller (via rails g controller home index --no-view-specs --no-helper) as my first page, and it is the request spec created by the generator that is failing.

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe 'Homes', type: :request do
  describe 'GET /' do
    it 'returns http success' do
      get root_path
      expect(response).to have_http_status(:success)
    end
  end
end

I have gone though the README options to fix this problem but they do not fix it. I have also tried rolling back to earlier versions of sprockets-rails (defaults to '4.1.1'. Tried rolling back as far as '3.3.0') and sprockets.

I built the latest app with:

rails new knowledge-hub --database=postgresql --skip-jbuilder skip-test --css=sass --skip-bundle

And manually added gem 'dartsass-rails' before running bundle. I thought the --css=sass might install Dart Sass but that didn't appear to be the case. I don't think it is clear in the documentation as to the css syntax to choose Dart Sass.

The only occurrences of sass in my Gemfile.lock are:

dartsass-rails (0.4.0)

and

DEPENDENCIES
  bootsnap
  capybara
  dartsass-rails

The full test error backtrace is:

Failures:

  1) Homes GET / returns http success
     Failure/Error: <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
     
     LoadError:
       cannot load such file -- sassc
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/autoload/sassc.rb:2:in `<main>'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/sassc_processor.rb:42:in `initialize'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/sassc_processor.rb:27:in `new'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/sassc_processor.rb:27:in `instance'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/sassc_processor.rb:31:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:84:in `call_processor'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `reverse_each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `call_processors'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:22:in `block in <class:CompositeProcessor>'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:33:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:84:in `call_processor'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `reverse_each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `call_processors'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:182:in `load_from_unloaded'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:59:in `block in load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:43:in `load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `block in load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `fetch'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/bundle.rb:27:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:84:in `call_processor'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `reverse_each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `call_processors'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:182:in `load_from_unloaded'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:59:in `block in load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:43:in `load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `block in load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `fetch'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/bundle.rb:32:in `block in call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/3.1.0/set.rb:511:in `each_key'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/3.1.0/set.rb:511:in `each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/bundle.rb:31:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:84:in `call_processor'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `reverse_each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/processor_utils.rb:65:in `call_processors'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:182:in `load_from_unloaded'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:59:in `block in load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/loader.rb:43:in `load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `block in load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `fetch'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/cached_environment.rb:44:in `load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/base.rb:81:in `find_asset'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/base.rb:88:in `find_all_linked_assets'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:125:in `each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:125:in `to_a'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:125:in `block (2 levels) in find'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `block in synchronize'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `synchronize'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `synchronize'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:22:in `execute'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/promise.rb:564:in `block in realize'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:29:in `post'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/promise.rb:563:in `realize'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/promise.rb:250:in `execute'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/promise.rb:297:in `execute'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:124:in `block in find'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:123:in `map'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.1.1/lib/sprockets/manifest.rb:123:in `find'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/railtie.rb:53:in `each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/railtie.rb:53:in `map'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/railtie.rb:53:in `precompiled_assets'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/railtie.rb:38:in `asset_precompiled?'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/railtie.rb:266:in `block (3 levels) in <class:Railtie>'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:368:in `precompiled?'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:372:in `raise_unless_precompiled_asset'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:338:in `digest_path'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:326:in `asset_path'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:103:in `block in resolve_asset_path'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:243:in `block in resolve_asset'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:242:in `each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:242:in `detect'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:242:in `resolve_asset'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:102:in `resolve_asset_path'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:80:in `compute_asset_path'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/helpers/asset_url_helper.rb:203:in `asset_path'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/helpers/asset_url_helper.rb:348:in `stylesheet_path'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/helpers/asset_tag_helper.rb:180:in `block in stylesheet_link_tag'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/helpers/asset_tag_helper.rb:179:in `map'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/helpers/asset_tag_helper.rb:179:in `stylesheet_link_tag'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:186:in `block in stylesheet_link_tag'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:184:in `map'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:184:in `stylesheet_link_tag'
     # ./app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__1910033771923689270_24460'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/base.rb:244:in `public_send'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/base.rb:244:in `_run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/template.rb:157:in `block in render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/notifications.rb:208:in `instrument'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/template.rb:361:in `instrument_render_template'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/template.rb:155:in `render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/renderer/template_renderer.rb:76:in `block in render_with_layout'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/notifications.rb:206:in `block in instrument'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/notifications.rb:206:in `instrument'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/renderer/template_renderer.rb:74:in `render_with_layout'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/renderer/template_renderer.rb:59:in `render_template'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/renderer/template_renderer.rb:11:in `render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/rendering.rb:117:in `block in _render_template'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/base.rb:270:in `in_rendering_context'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/rendering.rb:116:in `_render_template'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/streaming.rb:216:in `_render_template'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/rendering.rb:103:in `render_to_body'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/rendering.rb:46:in `render_to_body'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/renderers.rb:141:in `render_to_body'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/abstract_controller/rendering.rb:25:in `render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/rendering.rb:30:in `render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/instrumentation.rb:22:in `block (2 levels) in render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/3.1.0/benchmark.rb:311:in `realtime'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/core_ext/benchmark.rb:14:in `ms'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/instrumentation.rb:22:in `block in render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/instrumentation.rb:91:in `cleanup_view_runtime'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activerecord-7.0.4/lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/instrumentation.rb:21:in `render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/implicit_render.rb:35:in `default_render'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/abstract_controller/base.rb:215:in `process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/rendering.rb:53:in `process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/abstract_controller/callbacks.rb:234:in `block in process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actiontext-7.0.4/lib/action_text/rendering.rb:20:in `with_renderer'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actiontext-7.0.4/lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/callbacks.rb:127:in `instance_exec'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/callbacks.rb:138:in `run_callbacks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/abstract_controller/callbacks.rb:233:in `process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/rescue.rb:22:in `process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/notifications.rb:206:in `block in instrument'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/notifications.rb:206:in `instrument'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/instrumentation.rb:66:in `process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activerecord-7.0.4/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/abstract_controller/base.rb:151:in `process'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionview-7.0.4/lib/action_view/rendering.rb:39:in `process'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal.rb:188:in `dispatch'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_controller/metal.rb:251:in `dispatch'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/routing/route_set.rb:32:in `serve'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/journey/router.rb:50:in `block in serve'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/journey/router.rb:32:in `each'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/journey/router.rb:32:in `serve'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/routing/route_set.rb:852:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/tempfile_reaper.rb:15:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/etag.rb:27:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/conditional_get.rb:27:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/head.rb:12:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/http/permissions_policy.rb:38:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/http/content_security_policy.rb:36:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/session/abstract/id.rb:266:in `context'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/session/abstract/id.rb:260:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/cookies.rb:696:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/callbacks.rb:99:in `run_callbacks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/rack/logger.rb:40:in `call_app'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/rack/logger.rb:25:in `block in call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/tagged_logging.rb:99:in `block in tagged'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/tagged_logging.rb:37:in `tagged'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/tagged_logging.rb:99:in `tagged'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/rack/logger.rb:25:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/request_id.rb:26:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/method_override.rb:24:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/runtime.rb:22:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/executor.rb:14:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/static.rb:23:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-2.2.6/lib/rack/sendfile.rb:110:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/middleware/host_authorization.rb:131:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/engine.rb:530:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-test-2.0.2/lib/rack/test.rb:358:in `process_request'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rack-test-2.0.2/lib/rack/test.rb:155:in `request'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/testing/integration.rb:279:in `process'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/testing/integration.rb:16:in `get'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/actionpack-7.0.4/lib/action_dispatch/testing/integration.rb:370:in `get'
     # ./spec/requests/home_spec.rb:8:in `block (3 levels) in <top (required)>'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:263:in `instance_exec'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:263:in `block in run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:486:in `block in run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-rails-6.0.1/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:390:in `execute_with'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:486:in `run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:468:in `with_around_example_hooks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:259:in `run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:646:in `block in run_examples'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:642:in `map'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:642:in `run_examples'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:607:in `run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `block in run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `map'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `map'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:2070:in `with_suite_hooks'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:116:in `block in run_specs'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/reporter.rb:74:in `report'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:115:in `run_specs'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:89:in `run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:71:in `run'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:45:in `invoke'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/exe/rspec:4:in `<top (required)>'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/bin/rspec:25:in `load'
     # /Users/robert.nichols/.rbenv/versions/3.1.3/bin/rspec:25:in `<main>'

Finished in 0.62344 seconds (files took 1.97 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/requests/home_spec.rb:7 # Homes GET / returns http success

manifest.js contains just these two lines:

//= link_tree ../images
//= link_tree ../builds

I have run bundle exec rails dartsass:build successfully a number of times. app/assets/stylesheets/application.scss contains just the comment //Sassy. I have added the following just to check the CSS builds correctly:

.foo {
  color: red;
}

And that generated the expected app/assets/builds/application.css:

.foo{color:red}

LoadError: cannot load such file -- sassc

I have an empty rails 7.0.2.2 app created just now that throws an error when using rails assets:precompile.

$ rails assets:precompile
+ /home/me/.rvm/gems/ruby-3.1.0/gems/dartsass-rails-0.2.0/exe/linux/sass --load-path /home/me/sites/temp/temp/app/assets/stylesheets /home/me/sites/temp/temp/app/assets/stylesheets/application.scss:/home/me/sites/temp/temp/app/assets/builds/application.css

As far as I can tell, sprockets-rails provides the task rails assets:precompile, but isn't aware of dartsass, and is therefore complaining that there's no sass compiler. sassc-rails isn't in my Gemfile, which explains why sprockets is complaining, but adding it defeats the purpose of using dartsass-rails.

Is there some configuration option I'm missing, to presumably tell sprockets to stop handling sass in favor of dartsass-rails?

rails dartsass:build is failing with below issue

`rails aborted!
Errno::ENOEXEC: Exec format error - C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/dartsass-rails-0.4.0/lib/tasks/../../exe/dartsass --style=compressed --no-source-map --load-path E:/monthly-report-rails7/app/assets/stylesheets --load-path E:/monthly-report-rails7/app/assets/builds --load-path E:/monthly-report-rails7/app/assets/config --load-path E:/monthly-report-rails7/app/assets/images --load-path E:/monthly-report-rails7/app/assets/stylesheets --load-path C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/stimulus-rails-1.1.0/app/assets/javascripts --load-path C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/turbo-rails-1.1.1/app/assets/javascripts --load-path C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/importmap-rails-1.1.5/app/assets/javascripts --load-path C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/actiontext-7.0.3.1/app/assets/javascripts --load-path C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/actiontext-7.0.3.1/app/assets/stylesheets --load-path C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/actioncable-7.0.3.1/app/assets/javascripts --load-path C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activestorage-7.0.3.1/app/assets/javascripts --load-path C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/actionview-7.0.3.1/lib/assets/compiled --load-path E:/monthly-report-rails7/app/javascript --load-path E:/monthly-report-rails7/vendor/javascript E:/monthly-report-rails7/app/assets/stylesheets/application.scss:E:/monthly-report-rails7/app/assets/builds/application.css

Tasks: TOP => dartsass:build
(See full trace by running task with --trace)`

I'm facing an issue with dartsass:build rake task which i'm not able to resolve it any idea why it's happening ?

Doesn't work out of the box on WSL2

Easy fix though:
change Procfile.dev ->

web: bundle exec rails server -p 3000
css: bundle exec rails dartsass:watch

Without this it complains about 16:26:48 web.1 | /usr/bin/env: ‘ruby\r’: No such file or directory which is just a line ending issue with WSL2

how combine it with classic sprockets ?

how include application.css with : *= require_tree . for include all my sass standard files ?
or
how import all files in folder with @use rule like you suggest in read me... /**/* dosnt works

Exemple of my old project, application.sass :

/*
 *= require jquery-ui/all
 *= require fullcalendar
 */

@import 'compass/css3'
@import 'included/all/**/*'  //global style
@import 'included/lib/**/*'  //lib
@import 'all/**/*'                //page style

what the equivalent for now ?

asset_url helpers don't work

In switching over from sass-rails to dartsass-rails, I noticed the asset path helpers no longer work. In development mode, something like this works fine:

div {
    background-image: url("path/in/assets/to/image.jpg");
}

but in production, neither that nor this works:

div {
    background-image: asset-url("path/in/assets/to/image.jpg");
}

README Suggestion for sassc LoadError

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.

Does not work on Mac M2 Docker Container

Trying to execute the binary associated with this architecture will result in the following:

/bundle/ruby/3.2.0/gems/dartsass-rails-0.4.1 # ./exe/dartsass 
+ /bundle/ruby/3.2.0/gems/dartsass-rails-0.4.1/exe/aarch64-linux/sass
Segmentation fault
$ uname-m

is aarch64.

I am thinking this might be the same problem that was present in tailwindcss-rails at some point?

Error: Can't find stylesheet to import

Thanks a lot for this new gem which I'm trying to replace sassc-rails in our project (and some day we might manage to migrate away from sass entirely, who knows).

We import some old foundation stylesheets like so: @import "foundation/functions". With sassc-rails this correctly finds the file in the foundation gem under vendor/assets/stylesheets/foundation/_functions.scss, but when using dartsass-rails and running rails dartsass:install or rails dartsass:build it yields Error: Can't find stylesheet to import. The build error can be "solved" by copying the stylesheet from the gem into the app under app/assets/stylesheets/foundation/_functions.scss.

Should vendor/assets/stylesheets be added to CSS_LOAD_PATH in lib/tasks/build.rake?

[BUG] topological sort failed:

When I use with active_admin gem (there is sass-rails inside), this error appears:

topological sort failed: [#<Rails::Initializable::Initializer:0x000000010e5500a0 @name=:setup_compression, @context=#<SassC::Rails::Railtie>, @options={:group=>:all, :after=>:setup_sass}, @block=#<Proc:0x000000010d157a58 /.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/sassc-rails-2.1.2/lib/sassc/rails/railtie.rb:72>>, #<Rails::Initializable::Initializer:0x000000010e49fc00 @name=:setup_sass, @context=#<SassC::Rails::Railtie>, @options={:group=>:all, :after=>:setup_compression}, @block=#<Proc:0x000000010f0d7040 /.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/dartsass-sprockets-3.1.0/lib/sassc/rails/railtie.rb:36>>, #<Rails::Initializable::Initializer:0x000000010e49fb60 @name=:setup_compression, @context=#<SassC::Rails::Railtie>, @options={:group=>:all, :after=>:setup_sass}, @block=#<Proc:0x000000010f0d6f78 /.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/dartsass-sprockets-3.1.0/lib/sassc/rails/railtie.rb:74>>]

Hot reloading

What is the recommend approach to auto reloading? - if I save a scss file, I can see the automatic compilation to app/assets/builds/application.css - which is great, but it would be nice if the CSS was updated on the page I am viewing also. - Hot Module Replacement of some kind would be nice. - I guess I could watch the app/assets/builds/ folder with the listen gem. - but it would be great if this was built in to this gem - or there were some tips in the readme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.