-
-
Save doctyper/736729 to your computer and use it in GitHub Desktop.
$ compass compile path/to/sass/ --trace | |
ArgumentError on line 95 of /Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/compiler.rb: wrong number of arguments (3 for 2) | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/compiler.rb:95:in `compile_if_required' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/compiler.rb:82:in `run' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/compiler.rb:80:in `each' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/compiler.rb:80:in `run' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/compiler.rb:103:in `timed' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/compiler.rb:79:in `run' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/commands/update_project.rb:36:in `perform' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/commands/base.rb:18:in `execute' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/commands/project_base.rb:19:in `execute' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/exec/sub_command_ui.rb:43:in `perform!' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/exec/sub_command_ui.rb:15:in `run!' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/bin/compass:25 | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/bin/compass:39:in `call' | |
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/bin/compass:39 | |
/usr/local/bin/compass:19:in `load' | |
/usr/local/bin/compass:19 |
def compile(sass_filename, css_filename, additional_options = {})
start_time = end_time = nil
css_content = logger.red do
timed do
engine(sass_filename, css_filename).render
end
end
duration = additional_options[:time] ? "(#{(css_content.__duration * 1000).round / 1000.0}s)" : ""
write_file(css_filename, css_content, options.merge(:force => true, :extra => duration))
end
As you can see it accepts 3 arguments... What other plugins are you using? What ruby version?
Removing 'require "lemonade"' from config.rb fixes the error, but now I see:
$ compass compile path/to/sass/ --trace
error path/to/sass/src/home.scss (Line 29: Undefined mixin 'icon-sprite'.)
ruby 1.8.7 (2009-06-12 patchlevel 174)
Sounds like I broke lemonade, but you don't need it anymore it's built in.
But note that the API has changed from before.
Right, I'm trying to use the new API, but I get an "Undefined mixin 'icon-sprite'" error when trying to reference a sprite.
it's only called icon-sprite if your icons are in a folder called "icon". if the folder is called "foo" then the mixin is "foo-sprite"
Ah, thanks. Just finished porting over the API (have several sprites in use). I'll file a couple of bugs once I isolate some issues, but one feature that I miss terribly is y-offset. I had to re-export some images with spacing built-in to work around that limitation.
Thanks for helping test! You can set uniform spacing per sprite, but I guess you needed to specify the y-spacing different from the x-spacing?
Well, it's different from spacing in that Lemonade offsets the image by your passed-in y-value.
For example, if you gave it a y-offset of 3, it would position the image beginning 3 pixels from the top. The spacing parameter pads the area between each sprite, but still positions the image flush with the top of the element.
Am I making sense?
Yes. You can still do that by using this function directly like you were before with sprite-image()
http://beta.compass-style.org/reference/compass/helpers/sprites/#sprite
Please open
/Library/Ruby/Gems/1.8/gems/compass-0.11.alpha.4/lib/compass/compiler.rb
and show me what line 113 says.