首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >当我尝试将rails 7部署到heroku时出错,我得到SassC::SyntaxError: Error

当我尝试将rails 7部署到heroku时出错,我得到SassC::SyntaxError: Error
EN

Stack Overflow用户
提问于 2022-03-05 09:34:50
回答 1查看 267关注 0票数 0

当我试图部署时,我会产生此错误:

代码语言:javascript
运行
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-05 11:54:13

用于Rails的顺风CSS与SassC::Rails不兼容

在Rails 6的Gemfile 6中默认包含的sassc-rails扩展使用了现代的CSS特性,为了避免像SassC::SyntaxError这样的错误,您必须从Gemfile中删除gem。

sassc-rails中删除Gemfile,运行bundle,提交更改并重新部署。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71361055

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档