我有文件app / assets / stylesheets / themes / plexa / home.sass
添加到config / manifest.js
// =链接主题/plexa/home.css
检查http://localhost:3000/assets/themes/plexa/home.css
-可以,我看到CSS!
但是,如果我添加到rails布局:
stylesheet_link_tag "themes/plexa/home"
这行不通!
它引发了Rails异常:/ themes / plexa / home.css上的ActionView :: Template :: Error
尝试使用调试器:
byebug) stylesheet_link_tag "themes/plexa/home"
*** Sprockets::Rails::Helper::AssetNotPrecompiled Exception: themes/plexa/home.css
我阅读了所有链轮文档和升级指南,但不明白为什么stylesheet_link_tag不起作用(Rails 5.1)
更新: = stylesheet_link_tag“ / assets / themes / plexa / home”可行,但是我不明白为什么我需要设置资产路径?
更新:链轮尚未更新,这就是为什么manifest.js被忽略的原因,因为有一个旧的ruby版本2.4.6,需要更新