我正在使用windows7和一个叫做Prepros的应用程序来编译.scss。(http://alphapixels.com/prepros/ )。我还将Gumby Framework(http://gumbyframework.com/)下载到本地主机web服务器的文档根目录中。我的目标是使用gumby框架和Prepros。
当我尝试编译scss文件时,我收到以下错误:
Syntax error: Undefined operation: "power(golden_ratio(), 1) times 16px".
on line 52 of Z:/Ampps/www/Gumby-master/sass/extensions/modular-scale/stylesheets/_modular-scale.scss
from line 23 of Z:\Ampps\www\Gumby-master\sass\gumby.scss Use --trace for backtrace.另外,如果有用的话,下面是包含在文件夹www\Gumby- config.rb中的主文件:
# Require any additional compass plugins here.
# Tell compass where to find local extensions
# If you followed directions and ran 'gem install modular-scale' comment the next two lines out:
extensions_dir = "sass/extensions"
Compass::Frameworks.register('modular-scale', :path => File.expand_path("# {extensions_dir}/modular-scale"))
# Uncomment these to use regular Ruby gems.
# require 'modular-scale'
# require 'sassy-math'
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
# You can select your preferred output style here (can be overridden via the command line) :nested or :expanded or :compact or :compressed:
output_style = :compact
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass最后,我检查了this线程,但我没有发现它有什么帮助。
发布于 2013-12-09 11:42:49
解决方案:我尝试了几种方法来解决这个问题,我不知道到底是哪一种方法解决了这个问题。
C:\Ruby193\lib\ruby\gems\1.9.1\gems,但实际上我意识到我必须提供此路径C:\Ruby193\bin\ruby.exe,就像Prepros手册中的图片一样。)-as说in this thread,我打开我的指南针config.rb并注释掉了Compass::Frameworks.register('modular-scale', :path => File.expand_path("#{extensions_dir}/modular-scale")),并取消了对#require 'modular-scale'和#require 'sassy-math'的注释。
发布于 2014-08-10 18:55:47
我也遇到了同样的问题。所以我想分享我所做的事情。
Gumby框架README.md文件声明“注意:请使用模块化的scale 1.0.6,2.x尚未集成”。确保您的机器上安装的modular scale版本是1.0.6!
如何检查?
Ruby200让我们假设你的安装的位置是“C:\
如何安装Modular Scale v1.0.6?
还有什么需要注意的?
就像丹尼尔说的打开你的config.rb。请确保其中包含以下代码行!
#Require any additional compass plugins here.
require 'modular-scale'
require 'sassy-math' 无论您做什么,都不要在config.rb文件中包含以下代码。要让这段代码真正工作,您必须在您的sass目录中有一个名为extensions的目录,并且您必须将所有模块化规模的二进制文件复制到该目录中。
extensions_dir = "sass/extensions"
Compass::Frameworks.register('modular-scale', :path => File.expand_path("#{extensions_dir}/modular-scale"))如果您遇到任何其他问题,并设法解决它,请在这里添加您的答案!目前整个安装体验都很糟糕。
发布于 2014-09-10 19:03:07
Parth Shah的+1 --这对我很有效。但是安装modular-scale 1.0.6的命令实际上是:
gem安装模块化规模的-v 1.0.6
他漏掉了v前面的连字符。
顺便说一句,到目前为止,Gumby已经进行了更新,因此Gumby现在应该可以与这些指南针、sass和模块化版本一起工作--请参阅下面的安装命令。
gem安装指南针-v0.12.4,gem安装sass -v3.2.18 gem安装模块化-v2.0.4
我仍然在运行旧版本,但这个更新已经得到了其他Gumby用户的确认。
https://stackoverflow.com/questions/20461020
复制相似问题