gpt4 book ai didi

css - rails 错误编译 css Assets

转载 作者:太空宇宙 更新时间:2023-11-04 14:30:30 25 4
gpt4 key购买 nike

我正在使用 compass ,尝试在 application.scss 中导入我的自定义 scss 文件并出现此错误: enter image description here

这里是我的 application.scss 代码:

/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree
*/

@import "foundation_and_overrides";
@import "pnp";

如果我删除 require_tree 错误消息将消失但我的 scss 文件 (pnp.scss) 将不会加载到页面

最佳答案

app/assets/stylesheets 中创建一个名为 custom.css.scss 的新文件,然后在那里使用所有导入

@import "foundation_and_overrides";
@import "pnp";

希望对您有所帮助。

关于css - rails 错误编译 css Assets ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19224668/

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