Home > Mobile >  Error when I try do deploy rails 7 to heroku I get SassC::SyntaxError: Error
Error when I try do deploy rails 7 to heroku I get SassC::SyntaxError: Error

Time:03-06

I gen this error when I try to deploy:

success Saved lockfile.
remote:        Done in 6.58s.
remote:        yarn run v1.22.17
remote:        $ tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify
remote:        
remote:        Done in 1605ms.
remote:        Done in 2.29s.
remote:        rake aborted!
remote:        SassC::SyntaxError: Error: Function rgb is missing argument $green.
remote:                on line 1 of stdin
remote:        >> dden]){--tw-divide-opacity:1;border-color:rgb(209 213 219/var(--tw-divide-op
remote:           ------------------------------------------^
remote:        stdin:1
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sassc-rails-2.1.2/lib/sassc/rails/compressor.rb:29:in `call'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/sass_compressor.rb:30:in `call'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/processor_utils.rb:84:in `call_processor'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/processor_utils.rb:65:in `reverse_each'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/processor_utils.rb:65:in `call_processors'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/loader.rb:182:in `load_from_unloaded'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/loader.rb:59:in `block in load'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/loader.rb:43:in `load'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/cached_environment.rb:44:in `load'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/bundle.rb:32:in `block in call'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/bundle.rb:31:in `call'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/processor_utils.rb:84:in `call_processor'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/processor_utils.rb:65:in `reverse_each'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/processor_utils.rb:65:in `call_processors'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/loader.rb:182:in `load_from_unloaded'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/loader.rb:59:in `block in load'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/loader.rb:43:in `load'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/cached_environment.rb:44:in `load'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/base.rb:81:in `find_asset'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/base.rb:88:in `find_all_linked_assets'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/manifest.rb:125:in `each'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/manifest.rb:125:in `to_a'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.3/lib/sprockets/manifest.rb:125:in `block (2 levels) in find'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:24:in `block in execute 
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `block in synchronize'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `synchronize'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:47:in `synchronize'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:19:in `execute'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/promise.rb:564:in `block in realize'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:363:in `run_task 
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:352:in `block (3 
levels) in create_worker'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:335:in `loop'    
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:335:in `block (2 
levels) in create_worker'
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `catch'   
remote:        /tmp/build_04243406/vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `block in 
create_worker'
remote:        Tasks: TOP => assets:precompile
remote:        (See full trace by running task with --trace)
remote:
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed

CodePudding user response:

Tailwind CSS for Rails is not compatible with SassC::Rails:

Tailwind uses modern CSS features that are not recognized by the sassc-rails extension that was included by default in the Gemfile for Rails 6. In order to avoid any errors like SassC::SyntaxError, you must remove that gem from your Gemfile.

Remove sassc-rails from your Gemfile, run bundle, commit the changes, and redeploy.

CodePudding user response:

remote: ! Could not detect rake tasks remote: ! ensure you can run $ bundle exec rake -P against your app remote: ! and using the production group of your Gemfile. remote: ! rake aborted! remote: ! Don't know how to build task 'assets:clobber' (See the list of available tasks with rake --tasks)

  • Related