File_column undefined method `data_relative_path'


#1

i use file_column0.31 and rmagick1.141
i often got the error “undefined method `data_relative_path’ for
#Photo:0x6da7568” when the page display image.

i print some debug info ,when display natural:
in============================================url_for_file_column
object============================================#Photo:0x6c9d0b4
photo.data============================================./script/…/config/…/p

ubl
ic/photo/data/24/850A63B034A4FAB73.jpg
object.methods.grep(/method/)=====================data_just_uploaded?,data_op

tio
ns,data_relative_path,data_dir,data_relative_dir,data_temp,data_temp=,data,da

ta=
,data_magick_after_assign
method============================================data
subdir============================================thumb
relative_path==================24/thumb/850A63B034A4FAB73.jpg

and this is error
in============================================url_for_file_column
object============================================#Photo:0x6d97938
photo.data============================================850A63B034A4FAB73.jpg
object.methods.grep(/method/)=====================data?,data
method============================================data
subdir============================================thumb
i suppose the method “data_relative_path” cant be found.
version:
ruby 1.8.5 (2006-08-25) [i386-mswin32]
Rails 1.2.3

my sourcecode:

photo.rb
class Photo < ActiveRecord::Base
validates_format_of :data,
:with=>/^.*(.jpg|.JPG|.gif|.GIF)$/,
:message => “ä½ åªèƒ½ä¸Šä¼ JPG或则GIF的图片文件”
file_column :data, :magick => {
:versions => { “thumb” => “50x50>”, “medium” => “640x480>” }
}

belongs_to:user
belongs_to:entry
end

in **.rhtml
<%= image_tag url_for_file_column ‘photo’, ‘data’ %>

at rubyforge.com i found rmagick-1.14.1-win32.gem
and rmagick-1.15.6.gem ,iused
rmagick-1.14.1-win32.gem ;
and what is the difference???