StanAngeloff / compass-magick

Dynamic image generation for Compass using ChunkyPNG/PhantomJS.
http://StanAngeloff.github.com/compass-magick/
Other
157 stars 4 forks source link

Is compass-magick incompatible with latest Compass beta? #1

Closed lmartins closed 13 years ago

lmartins commented 13 years ago

Im getting the following error, with the beta2 would compile without errors:

NoMethodError on line 4 of /Users/luismartins/Sites/wip004/themes/wip004/css-src/extensions/compass-magick/lib/compass-magick/functions/image.rb: undefined method `context=' for nil:Compass::Magick::Commands::Image Run with --trace to see the full backtrace

StanAngeloff commented 13 years ago

Did you grab a copy of master? Magick has switched over to ChunkyPNG and support for Sass/Compass beta was added in this commit.

lmartins commented 13 years ago

Hum, i guess i was using a previous version. What im getting now though is that it compiles without errors but the generated images are gone from the front-end. Do i need to change anything else with this version?

btw, this plugin is making wonders for my workflow ;-)

lmartins commented 13 years ago

damn, now cant get it to work with neither combinations of Compass/Magick :-(

StanAngeloff commented 13 years ago

btw, this plugin is making wonders for my workflow ;-)

I am glad you find it helpful :-)

without errors but the generated images are gone from the front-end.

With the transition to ChunkyPNG, I haven't yet completed the bits where the file gets saved to disk. I am investigating options on how to integrate with Compass to generate sprites.

damn, now cant get it to work with neither combinations of Compass/Magick :-(

You're best option in this case would be to revert to the previous version and grab a compatible copy of Compass.

lmartins commented 13 years ago

I've tried that, switched back to compass beta2 (which i was using before), replaced the compass-magick files and the when i try to compile i get the error i was getting at first:

Change detected to: /Users/luismartins/Sites/wip004/themes/webipack004/css-src/theme01.sass NoMethodError on line 4 of /Users/luismartins/Sites/wip004/themes/webipack004/css-src/extensions/compass-magick/lib/compass-magick/functions/image.rb: undefined method `context=' for nil:Compass::Magick::Commands::Image Run with --trace to see the full backtrace

Is there anything else i can do to revert this?

Sorry to bother you with all these questions.

StanAngeloff commented 13 years ago

Sorry to bother you with all these questions.

Not an issue at all. If you are OK to edit Ruby files, you can go to the file in question (reported in the error message) and add the following code:

def context=(context)
  @context = context
end

This should be all you need to get 'round the error message.

lmartins commented 13 years ago

Just made a quick test a realized that Compass also upgraded the SASS version. Rolled back to sass-3.1.0.alpha.221 and everything running smoth again. Guess i'll wait for your updates on Compass-Magick to upgrade my compass setup.

Thanks Stan! :-)

lmartins commented 13 years ago

Strangely Compass-Magick stopped generating images. I have installed: Sass 3.1.0.alpha.221 (Bleeding Edge) Compass 0.11.beta.2 and the Compass-Magick that previosly worked.

Is there anything i can do to make it work again?

StanAngeloff commented 13 years ago

@lmartins at this point I am not sure why it would just stop generating images. Best option, if you cannot get back to a working set up, is to poke around the code and submit a patch against master to add support for saving images. I am pretty tied up at the moment and it's not a priority since the project doesn't have finalised APIs yet.

StanAngeloff commented 13 years ago

I have just updated the source to work against the latest Compass beta & ChunkyPNG. There is now a function which allows you to save to file as well.

I hope this helps.