Forum: Ruby on Rails file_column & RMagick

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3b87f1ad86f6a44241832314873e8d54?d=identicon&s=25 Ryan Lundie (Guest)
on 2006-06-05 23:55

Hi,

I have a site where I wish to upload a resize a picture, and store it in
the file system. The best solution that I have found for this so far is
using file_column. This was working great, for about an hour, but all of
the sudden I began to get the following error (only when i attempt to
resize).

    NameError (undefined method `assoc' for class `Magick::ImageList'):
    /usr/local/lib/ruby/site_ruby/1.8/RMagick.rb:1002:in `undef_method'
/usr/local/lib/ruby/site_ruby/1.8/RMagick.rb:1002
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require' /vendor/plugins/trunk/lib/magick_file_column.rb:208:in
`file_column' /vendor/plugins/trunk/lib/file_column.rb:698:in
`file_column' /app/models/client_listing.rb:2
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in
`require_or_load'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in
`depend_on'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
`require_dependency'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in
`const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in
`const_missing' /app/controllers/listing_controller.rb:28:in `new'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
`perform_action_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in
`perform_action_without_benchmark'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
`perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in
`process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in
`process'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
`dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:in
`process_request'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
`process!'
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:600:in
`each_cgi'
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in
`each_cgi'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in
`process!'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in
`process!'
/users/home/b2blogic/domains/marqueeequity.ca/web/public/dispatch.fcgi:24


I did not make any changes (that i know of) to my code.  Please help me!
I am going insane!:)

Thanks.
036be8d5d83a98e546b98d64e3fd6c20?d=identicon&s=25 Sam Donaldson (Guest)
on 2006-06-06 10:26
(Received via mailing list)
this won't help you but...this is exactly why i wrote my own file upload
code by looking at how they did it in file_column.  I put this code in
my
model in the after_save method or you could even do after_create.
This topic is locked and can not be replied to.