Paperclip image url

It’s commonly referred to as a “cache buster”. Paperclip automatically appends the timestamp for the last time the file was updated. Say you were to remove the cache buster and use /system/photos/1/small/phone_large.jpg instead. The URL wouldn’t change when you changed the image and your visitors would see the old image for as long as they … Read more

Resize an image with Paperclip

You can use “160×160#” which will scale and crop to exactly that size, which is unique to paperclip. Otherwise you can use any of the ImageMagick geometry strings, detailed here: ImageMagick Geometry But I’ll quote the one you’re interested in: “160×160!” Width and height emphatically given, original aspect ratio ignored.

rails paperclip and passenger `is not recognized by the ‘identify’ command`

This is related to ImageMagick. The command_path option needs to point to the location where identify is installed. From the command line, you can determine this with which identify. $ which identify /some/path/to/identify Afterwards, set command_path to that path (in config/environments/development.rb): Paperclip.options[:command_path] = “/some/path/to”

Paperclip exception : Paperclip::AdapterRegistry::NoHandlerError

This Error is raised because you aren’t giving Paperclip a correct class. It’s a just a String. You should receive something like this in params “asset”=> {“image”=> #<ActionDispatch::Http::UploadedFile:0x000000056679e8 @content_type=”image/jpg”, @headers= “Content-Disposition: form-data; name=\”asset[image]\”; filename=\”2009-11-29-133527.jpg\”\r\nContent-Type: image/jpg\r\n”, @original_filename=””2009-11-29-133527.jpg””, @tempfile=#<File:/tmp/RackMultipart20120619-1043-yvc9ox>>} And you should have something like this in yout View (in HAML, very simplified): = form_for @product, html: … Read more

Rails 3 paperclip vs carrierwave vs dragonfly vs attachment_fu [closed]

I’ve used both Paperclip and Carrierwave, and if I were you, I’d go for Carrierwave. It’s a lot more flexible. I also love the fact that it doesnt clutter your models with configuration. You can define uploader classes instead. It allows you to easily reuse, extend etc your upload configuration. Did you watch the Carrierwave … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)