File_column and adding/changing :versions

I’m using file_column 0.3.1 and I recently installed RMagick on my
machines, so I’m adding the :versions resizing functionality to my

I quickly noticed that resized versions are only being created for newly
uploaded images, and that no magicked versions get created for existing
images. I thought file_column would be smart enough to generate
:versions as needed.

Has this been addressed in the trunk version? If so, I’ll start grabbing
new versions of the plugin via SVN.

If not, is there a simple routine I can put in environment.rb or in a
rake task to force generation of :versions on existing images? I want to
be sure I can do one of these things painlessly before I go any further
because I don’t want to have a big hassle if I choose to add more image
versions or change generated sizes as my app evolves.

Yes, I know this would be a very long, resource-intensive process if my
app had many thousands of images… but it doesn’t. However, there are
enough that requiring all images to be re-uploaded manually is not an

If it’s not already in place may I suggest having them generate
dynamically during url_for_file_column calls when the version of an
image doesn’t already exist?

This really might be a better way to generate them in the first place,
rather than on upload as it seems to be.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs