Question

I am currently using ChunkyPNG, but I want to give OilyPNG a try. I have tried using it in a simple ruby script and the performance is much better. I basically install both gems in the Gemfile and require 'oily_png' in my script.

However, in my RoR app, I fail to see how to require 'oily_png'. I am currently not requiring chunky_png anywhere, but in the docs is said that I need to require 'oily_png'. Where would I do that?

Thanks!

Was it helpful?

Solution

Just avoid requiring ChunkyPNG on the Gemfile. Something like this:

gem 'chunky_png', :require => false

So, the ChunkyPNG gem will be installed, but when Rails tells Bundler to require all the gems, this one won't be required, but the OilyPNG will be.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top