直接从红宝石使用时找不到指南针mixins [英] Compass mixins not found when using directly from ruby

查看:108
本文介绍了直接从红宝石使用时找不到指南针mixins的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用使用Compass的GLI gem来构建新的ruby脚本。但是,每当我使用 bundle exec SASS / Compass运行应用程序时,似乎都找不到我包含在.scss文件中的mixins。我收到以下错误...

I am building a new ruby script using GLI gem that uses Compass within. However, whenever I run the app using bundle exec SASS/Compass can never seem to find the mixins that I include in my .scss file. I get the following error...

错误:找不到导入文件或文件不可读:指南针/ css3。

我知道解决方案是设置环境变量。但是,我不知道需要设置哪个变量。

I know the solution is to set an environment variable. However, I have no clue as to which variable needs to be set.

更新

我应该添加这是我撰写的另一篇文章的后续文章-使用Ruby中的Compass(不是shell) )

I should have added that this is a follow up to another post that I had - Using Compass from Ruby (not shell)

这是我用来从应用程序中调用指南针的代码。

Here is the code that I am using to invoke compass from my app.

require 'compass'
require 'sass/plugin'

compiler = Compass::Compiler.new('.','.','.',{:style => :compact})
compiler.compile(sass_file,css_file)

这是抛出的错误


错误:找不到或无法读取的导入文件:指南针/ css3。

error: File to import not found or unreadable: compass/css3.

加载路径:/ Volumes / MacRAID / joeworkman / Desktop / stake-test / Badges / Badges.source / Contents

Load path: /Volumes/MacRAID/joeworkman/Desktop/stake-test/Badges/Badges.source/Contents

我本以为只有当我在<$ c $以下运行时才会发生这种情况c>捆绑执行程序。但是,即使我正常运行,它也会每次发生。

I originally thought that this only happened when I was running under bundle exec. However, its does happen every time even if I were to run in it normally.

更新#2

我可以肯定这是SASS :load_paths 问题。如果将我的 SASS_PATH 环境变量设置为以下值,则一切正常。我不想依靠环境变量。

I am pretty certain that this is a SASS :load_paths issue. If I set my SASS_PATH environment variable to the below value everything works. I don't want to depend on environment variables though.

〜/ .rvm / gems / ruby​​-1.9.3-p194 / gems / compass-0.12。 2 / frameworks / compass / stylesheets

推荐答案

请确保您在下面检查了答案发布。在我在此处发布的发现与其他帖子所提出的建议之间,问题得到了解答。

Make sure that you check out the answers on the below post. Between my findings posted here and the suggestions made on the other post, the question is answered.

使用Ruby中的Compass(不是外壳)

这篇关于直接从红宝石使用时找不到指南针mixins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆