【问题标题】:File to import not found or unreadable: singularitygs | Using Prepros找不到或无法读取要导入的文件:singularitygs |使用 Prepros
【发布时间】:2014-11-02 21:35:03
【问题描述】:

我已经用 bower 安装了奇异性,并且正在使用 prepros 作为编译器。

尝试编译我的 .scss 文件会返回以下错误:

File to import not found or unreadable: singularitygs

在我的 styles.scss 文件的顶部:

@import "compass/reset";
@import "singularitygs";

config.rb:

require 'singularitygs'

relative_assets = true
css_dir = "css"
sass_dir = "scss"
images_dir = "images"

附加信息(可能相关):我只是在使用 Prepros '监视'我的公用文件夹,因此 config.rb 文件位于该文件夹的根目录。

有人知道问题出在哪里吗?

【问题讨论】:

    标签: sass


    【解决方案1】:

    我现在已经通过以下步骤完成了这项工作:

    ► 在我的系统上安装 Ruby gems,并安装了奇异性 在命令行上使用 gems:

    gems install singularity

    ► 转到 Prepros 选项 -> 高级选项 -> 使用自定义 Ruby,将 Prepros 设置为使用系统 Ruby 安装(而不是内置版本)。 (如果它已经在您的路径中,只需输入“ruby”)

    ► 在 .scss 文件中导入指南针,然后是奇异点和断点(响应式网格需要后者):

    @import "compass";
    @import "singularitygs";
    @import "breakpoint";
    

    ► 在项目根目录中添加 config.rb 文件并包含以下行:

    require 'singularitygs'
    

    现在一切顺利!

    【讨论】:

    • 您使用的是什么操作系统?我使用的是 Mac,而我的 Prepros 5.2.0 没有提到的选项。
    • 我使用的是 Windows 7,看起来我还在使用 4.2 版
    猜你喜欢
    • 2012-10-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-26
    • 2011-11-30
    • 2020-11-13
    • 2019-08-08
    • 2013-02-01
    相关资源
    最近更新 更多