用户故事我正在尝试部署 consuledemocracy 的本地实例,如果失败,则出现 Sass::CompileErrorDescription我的系统是 Ubuntu 22.04,我使用以下版本:Rails v6.1.7.7...
我正在尝试部署 consuledemocracy 的本地实例,如果失败,则会出现 Sass::CompileError
我的系统是 Ubuntu 22.04,我使用以下版本:Rails v6.1.7.7NodeJS v18.18.2PSQL v14.11Ruby v3.2.3
我已按照本地安装的步骤进行操作,虽然可以部署服务器(bin/rails server -b 0.0.0.0),但访问本地主机时出现以下错误:
Completed 500 Internal Server Error in 5267ms (ActiveRecord: 165.5ms | Allocations: 3295956)
ActionView::Template::Error (Error: Can't find stylesheet to import.
1 @import "sassc-embedded-import:19";
^^^^^^^^^^^^^^^^^^^^^^^^^^
sassc-embedded-import:18 1:9 @import
/home/singular/consul/consuldemocracy/app/assets/stylesheets/application.scss 10:9 root stylesheet):
sassc-embedded (1.70.1) lib/sassc/embedded.rb:66:in `rescue in render'
sassc-embedded (1.70.1) lib/sassc/embedded.rb:13:in `render'
sassc-rails (2.1.2) lib/sassc/rails/template.rb:40:in `block in call'
sprockets (4.2.1) lib/sprockets/utils.rb:145:in `block in module_include'
sprockets (4.2.1) lib/sprockets/utils.rb:130:in `synchronize'
sprockets (4.2.1) lib/sprockets/utils.rb:130:in `module_include'
sassc-rails (2.1.2) lib/sassc/rails/template.rb:39:in `call'
sprockets (4.2.1) lib/sprockets/processor_utils.rb:84:in `call_processor'
...
...
当我运行 bin/rails assets:precompile 时,我得到:
singular@euprojects: ~/consul/consuldemocracy$ bin/rails assets:precompile
rails aborted!
SassC::SyntaxError: Error: Can't find stylesheet to import. (SassC::SyntaxError)
1 @import "sassc-embedded-import:19";
^^^^^^^^^^^^^^^^^^^^^^^^^^
sassc-embedded-import:18 1:9 @import
/home/singular/consul/consuldemocracy/app/assets/stylesheets/application.scss 10:9 root stylesheet
Caused by:
Sass::CompileError: Can't find stylesheet to import. (Sass::CompileError)
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
我觉得好像缺少样式表,但我在网上找不到任何信息。