gpt4 book ai didi

ruby-on-rails - Rails 预编译错误 - 很难找到导致错误的文件

转载 作者:数据小太阳 更新时间:2023-10-29 07:39:28 26 4
gpt4 key购买 nike

我做了 RAILS_ENV=production rake assets:clean; RAILS_ENV=production rake assets:precompile --trace

我得到了

rake aborted!
Sass::SyntaxError: Invalid CSS after "}": expected selector or at-rule, was "}"
(in /Users/hsu-wei-cheng/Dropbox/Rails/dqa_dev_server/vendor/themes/lenord-single-page-theme/application.css)
(sass):7322

但是在 lenord-single-page-theme/application.css

/*
*= require_self
*= require_tree .
*/

我注释掉了所有的config.assets.precompile

  # Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
#config.assets.precompile += %w( bootstrap.css )
# config.assets.precompile += %w( vendor/themes/* )
#config.assets.precompile += %w( vendor/themes/**/application.js )
#config.assets.precompile += %w( vendor/themes/**/application.css )
# config.assets.precompile += %w[*.png *.jpg *.jpeg *.gif]

# Precompile *all* assets, except those that start with underscore
#config.assets.precompile << /(^[^_\/]|\/[^_])[^\/]*$/

如何获得有关错误的更多信息?

最佳答案

如果您的问题是 SASS 代码中某处的语法错误,为什么不使用 SASS 调试器呢?

网上有几个。例如两个用于 Chrome(可以与 TextMate 集成):Sass InspectorSass Sleuth .

关于ruby-on-rails - Rails 预编译错误 - 很难找到导致错误的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23775226/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com