Welcome Guest | Login

Error when using file_column to upload image

I set up my first site on hostingrails.com last night. Got most of it working thanks to the superb instructions.

In my app, I use file_column to upload images. When I tried to upload an image, I got a server error. The production.log file shows this:

----
Errno::ENOENT (No such file or directory - /home/USERNAME/APPNAME/public/photo/image/tmp/1220454239.740867.30163 or /home/USERNAME/APPNAME/public/photo/image
/production/1):
   /usr/local/lib/ruby/1.8/fileutils.rb:505:in `rename'
   /usr/local/lib/ruby/1.8/fileutils.rb:505:in `mv'
   /usr/local/lib/ruby/1.8/fileutils.rb:1395:in `fu_each_src_dest'
   /usr/local/lib/ruby/1.8/fileutils.rb:1411:in `fu_each_src_dest0'
   /usr/local/lib/ruby/1.8/fileutils.rb:1393:in `fu_each_src_dest'
   /usr/local/lib/ruby/1.8/fileutils.rb:494:in `mv'
   /vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:361:in `move_from'
   /vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:310:in `after_save'
   /vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:673:in `image_after_save'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in `send'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in `evaluate_method'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in `call'
   ...
----

But it looks like the files *are* getting created.

$ ls /home/USERNAME/APPNAME/public/photo/image/tmp/1220454239.740867.30163

... gives:

   ./  ../  Image030.jpg  medium/  small/  thumb/

... and

$ls /home/USERNAME/APPNAME/public/photo/image

... gives:

   ./  ../  tmp/

The /tmp directory has the temporary copy of the photo, so that's not the problem either.

Any tips on using file_column in hostingrails.com?

Thanks,

Antun

2008-09-03 02:12 PM

http://www.antunkarlovac.com/blog/
You may refer the ruby forum http://www.ruby-forum.com/topic/151772

2008-09-03 06:29 PM

Thanks Santhi, that was *exactly* the issue.

-Antun

2008-09-03 11:55 PM

http://www.antunkarlovac.com/blog/

Hello Guest! In order to post you must be an active client with us, please log in or sign up.