It seems that attachment_fu is a pretty popular plugin (it's great), but I've been having a terrible time trying to figure out an issue when using "update_attributes". I'm storing files on the file system rather than in a database. It seems that when "update_attributes" is called with a new file, upload_data= tries to copy a file that doesn't exist, the file name of the new upload_data. Anyway here's the error I get: No such file or directory -public/db_files/songs/4/Song.mp3 /usr/lib/ruby/1.8/fileutils.rb:1182:in `stat' /usr/lib/ruby/1.8/fileutils.rb:1182:in `lstat' /usr/lib/ruby/1.8/fileutils.rb:1160:in `stat' /usr/lib/ruby/1.8/fileutils.rb:1242:in `copy_file' /usr/lib/ruby/1.8/fileutils.rb:459:in `copy_file' /usr/lib/ruby/1.8/fileutils.rb:383:in `cp' /usr/lib/ruby/1.8/fileutils.rb:1377:in `fu_each_src_dest' /usr/lib/ruby/1.8/fileutils.rb:1393:in `fu_each_src_dest0' /usr/lib/ruby/1.8/fileutils.rb:1375:in `fu_each_src_dest' /usr/lib/ruby/1.8/fileutils.rb:382:in `cp' vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:154:in `copy_to_temp_file' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/object/misc.rb:23:in `returning' vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:152:in `copy_to_temp_file' vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:288:in `copy_to_temp_file' vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:265:in `temp_paths' vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:272:in `temp_path=' vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:250:in `uploaded_data=' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1672:in `attributes=' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1671:in `attributes=' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1591:in `update_attributes' app/controllers/songs_controller.rb:44:in `update' -e:4 I found some other people reporting these issues, ( http://beast.caboo.se/forums/2/topics/895 & http://beast.caboo.se/forums/2/topics/899 ). Does anyone have experience with this problem or have any good work arounds? Thanks.
on 2007-03-28 07:10
on 2007-03-28 08:21
On 3/27/07, Mitch M. <firstname.lastname@example.org> wrote: > Anyway here's the error I get: > /usr/lib/ruby/1.8/fileutils.rb:1393:in `fu_each_src_dest0' > vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:265:in > `update_attributes' > app/controllers/songs_controller.rb:44:in `update' > -e:4 > > I found some other people reporting these issues, ( > http://beast.caboo.se/forums/2/topics/895 & > http://beast.caboo.se/forums/2/topics/899 ). Does anyone have > experience with this problem or have any good work arounds? Thanks. If someone can write a failing test for this I can look at it. I haven't been seeing the issue in the projects I've been using it in. -- Rick O. http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com