How can I fix this compile error, when attempting to compile sass using Prepros and Gumby?

3.9k views Asked by At

I am using windows 7 to compile .scss with an application known as Prepros. (http://alphapixels.com/prepros/ ). I also downloaded the Gumby Framework(http://gumbyframework.com/) into my document root directory of localhost web-server. My goal is to use the gumby framework along with Prepros.

When I attempt to compile the scss file, I am receiving the following error:

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.

Also, if it is helpful, this is the config.rb file contained within the folder www\Gumby-master :

# 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

Lastly,I reviewed this thread, but I did not find it helpful.

3

There are 3 answers

0
Daniel Dropik On

SOLUTION: I tried several things to fix this, and I am not absolutely which of them were responsible for fixing it.

-as stated in this thread, I opened my compass config.rb and commented out Compass::Frameworks.register('modular-scale', :path => File.expand_path("#{extensions_dir}/modular-scale")), and un-commented #require 'modular-scale' and #require 'sassy-math'.

0
Parth Shah On

I also ran into this exact same issue. So I would like to share things which I did.

Gumby framework README.md file states "Note: Please use modular scale 1.0.6, 2.x has not been integrated yet". Make sure the version of modular scale installed on your machine is 1.0.6!

How to check?

  1. Let's assume the location of your Ruby installation is "C:\Ruby200".
  2. Go to C:\Ruby200\lib\ruby\gems\2.0.0\gems. In this directory, you will see all the gems that were installed on the machine. (You should see sass, compass, modular-scale among others)
  3. Make sure it says "modular-scale-1.0.6". If it doesn't, then delete the version you have over there. If you see multiple sassy-math over here, don't worry. We just want one modular-scale on the machine!

How to install Modular Scale v1.0.6?

  1. Run gem install modular-scale v 1.0.6

What else to watch out for?

Like Daniel said, open your config.rb. Make sure you have the following lines in it!

#Require any additional compass plugins here.
require 'modular-scale'
require 'sassy-math'   

Whatever you do, don't have the following code in your config.rb file. For this code to truly work, you have to have a directory called extensions in your sass directory, and you have to copy all the modular-scale binaries into that directory.

extensions_dir = "sass/extensions"
Compass::Frameworks.register('modular-scale', :path => File.expand_path("#{extensions_dir}/modular-scale"))

If you run into any other problems and somehow manage to solve it, please do add your answer here! The entire installation experience is terrible at the moment.

0
VanAlbert On

+1 for Parth Shah -- that worked for me. But the command to install modular-scale 1.0.6 is actually:

gem install modular-scale -v 1.0.6

He missed the hyphen before the v.

BTW as per this date, there has been a Gumby update so that Gumby supposedly now works with these compass, sass and modular-scale versions -- see below for install commands.

gem install compass -v0.12.4, gem install sass -v3.2.18 gem install modular-scale -v2.0.4

I am still running the older versions but this update has been confirmed by other Gumby users.