Dragonfly is a Ruby gem for a framework that enables on-the-fly processing for any content type. It is especially suited to image handling. Its uses range from image thumbnails to standard attachments to on-demand text generation. Use this tag for the Ruby gem, not the deprecated [dragonfly] tag, which is also the name of the Opera debugger (use [opera-dragonfly] for that meaning).
Questions tagged [dragonfly-gem]
142 questions
0
votes
1 answer
dragonfly rails 4 image_tag error
I'm building my photography portfolio in Rails 4.1.6 and Ruby 2.0.0p576.
I have 'collections' which have many 'photos'.
I am using dragonfly 1.0.10 for image uploads.
Collections Model
class Collection < ActiveRecord::Base
belongs_to…

unic0rn
- 13
- 3
0
votes
1 answer
Prawn PDF: how to add images uploaded with dragonfly
I like to generate PDF-Files which also includes images uploaded by the user. The prawn gem works so far, and can also embed images located in the file system.
My problem is that I want to include user uploaded images, and where these images are…

Meier
- 3,858
- 1
- 17
- 46
0
votes
1 answer
Dragonfly Imagemagick rotate, than crop than resize
I am using a jQuery plugin that allows basic image manipulation: cropping, rotating, zooming, etc.
I am able to rotate the image:
image = photo.image.rotate(wrapper.rotate)
I am able to crop the…

user3023421
- 333
- 1
- 7
- 16
0
votes
2 answers
Getting NameError while linking Dragonfly gem to index.html.erb
I have already linked Dragonfly gem to my project and it uploads images very well into creating posts via _form, but when I'm trying to add all these created posts to index.html.erb alltogether with uploaded using Dragonfly-gem images, it shows me…

lif3ar
- 103
- 4
0
votes
1 answer
dragonfly-s3 with S3 IAM user causing a forbidden 403 response from Amazon
I am using Rails 4.2.0 with dragonfly 1.0.10 and dragonfly-s3_data_store 1.1.0 with an Amazon IAM user set with a key and secret_key for auth and full permissions set for a specific bucket. When I try to save the model with the uploaded file, I get…

codabrink
- 140
- 1
- 7
0
votes
1 answer
Rails + Dragonfly + Nginx - wrong root path for images
I have Rails app that uses
gem 'dragonfly-s3_data_store', '~> 1.0.0'
and uploads assets to S3.
Files upload just fine, but then they won't display. If I look at the logs I see this:
*150 open()…

Stpn
- 6,202
- 7
- 47
- 94
0
votes
1 answer
Rails/Dragonfly: is it possible to decode URL (/media/W1siZiIsInRzYW...) to get the model instance it refers to?
This is what I want to accomplish:
On an extranet with a feed wall, users just type non-formatted text (non style, just \n and links recognition).
But quite often, users want to add a link to a document which is stored in the same extranet (using…

Jérémie
- 305
- 3
- 10
0
votes
3 answers
Dragonfly set original filename
I'm using Dropbox with Dragonfly to store my file uploads.
I have the following code:
if hash[:file_dropbox].present? #DROPBOX
path = "Attachments/" + Time.now.strftime("%d%m%Y_%H%M") + "_" + rand(1000).to_s + "_" +…

FastSolutions
- 1,809
- 1
- 25
- 49
0
votes
2 answers
Dragonfly/imagemagick resize and crop and maybe add white padding
With dragonfly I can do the following:
image.thumb('300x300#')
Which will resize the image, maintaining aspect ratio and cropping it centrally (effectively chopping off the ends of the longest edge).
However, if the image has an edge smaller than…

aaronrussell
- 9,389
- 5
- 38
- 62
0
votes
1 answer
Rails Dragonfly find files in use
We are using Dragonfly for file and image upload in the app and in the Rails Admin.
Dragonfly in app part
Users can apply for jobs and add their resume as attachment. When user uploads attachments and sucesfully apply for a job the files get…

FastSolutions
- 1,809
- 1
- 25
- 49
0
votes
1 answer
Ruby on Rails, Apache, Passenger error 500 when try to upload images in production
I have an ubuntu server with apache (2.4.7) + passenger (5.0.0.beta2) + rails (4.2.0) + dragonfly (1.0.7)
The site is running OK, but when I upload images its when the server sends a 500 error. Sometimes allows me to upload one image and the second…
0
votes
1 answer
How to migrate data between datastores using Dragonfly
Is it possible to migrate data between two different datastores using Dragonfly?
I'm currently storing images in the DB - using a custom relational data store, and want to migrate to an S3-like web API sore.

CambridgeMike
- 4,562
- 1
- 28
- 37
0
votes
1 answer
Tile an image x times to a y px output image in imagemagick
I am using ImageMagick (via Dragonfly in Ruby) and need to convert an image that looks like this:
X
To tile like this:
XXX
XXX
XXX
and have a set width (200 px in my case).
How would I accomplish this?

Rick
- 8,366
- 8
- 47
- 76
0
votes
1 answer
param is missing or the value is empty: photo : dragonfly gem
I want to display a particular image on my landing page that I have uploaded through the dragonfly gem.
I am getting following error: param is missing or the value is empty: photo
this is what I have on my landing.html.erb view:
<%= image_tag…

user3597950
- 9,201
- 6
- 26
- 35
0
votes
1 answer
Helicon Zoo/ISS 400 Bad Request error when accessing long url
I am using the Dragonfly gem in a Ruby-on-Rails app to generate converted image URL's on the fly but when I try to access the image's url I get the following error:
HTTP Error 400. The request URL is invalid.
This seems to be coming from IIS and…

Michael DiLalo
- 1
- 1