"can't convert Magick::GravityType into Integer"


#1

Am having trouble with file_column – on certain crop operations, it
says:

A TypeError occurred in [controller]#[action]:

can’t convert Magick::GravityType into Integer
[RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:90:in
`crop’

Any advice? Here’s the backtrace:

[RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:90:in
crop' [RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:90:intransform_image’
[RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:21:in
transform_with_magick' [RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:17:ineach_pair’
[RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:17:in
transform_with_magick' [RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:219:inheadshot_magick_after_assign’
[RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:218:in
headshot_magick_after_assign' [RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:657:insend’
[RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:657:in
headshot=' [RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:656:ineach’
[RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:656:in
headshot=' [RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:652:inheadshot=’
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1510:in
send' [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1510:inattributes=’
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1509:in
each' [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1509:inattributes=’
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1438:in
update_attributes' [RAILS_ROOT]/app/controllers/clients_controller.rb:22:inedit_headshot’
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/base.rb:910:in
send' [RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/base.rb:910:inperform_action_without_filters’
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/filters.rb:368:in
perform_action_without_benchmark' [RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
measure' [RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in
perform_action' [RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/base.rb:381:insend’
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/base.rb:381:in
process_without_filters' [RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/filters.rb:377:inprocess_without_session_management_support’
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in
process' [RAILS_ROOT]/vendor/rails/railties/lib/dispatcher.rb:38:indispatch’
[RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:150:in
process_request' [RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:54:inprocess!’
[RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:53:in
each_cgi' /usr/lib/ruby/1.8/fcgi.rb:597:ineach’
/usr/lib/ruby/1.8/fcgi.rb:597:in each_cgi' [RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:53:inprocess!’
[RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:23:in
`process!’
dispatch.fcgi:24


#2

Max R. wrote:

Am having trouble with file_column – on certain crop operations, it
says:

A TypeError occurred in [controller]#[action]:

can’t convert Magick::GravityType into Integer
[RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:90:in
`crop’

Any advice? Here’s the backtrace:

I’m having the exact same problem. Are you using Dreamhost to host your
site?


#3

John D. wrote:

I’m having the exact same problem. Are you using Dreamhost to host your
site?

Yes! That’s promising. Any ideas?


#4

I’ve been struggling with this for a couple of weeks. I have already
installed an updated version of RMagick to my homedir and still have the
problem. So I think that the problem has something to do with the
ImageMagick libraries. I have put in another support request to have
ImageMagick reinstalled, but I guess we’ll have to wait to see what the
response is. You should put in a support request too and hopefully they
will take the issue seriously.


#5

My response from Dreamhost:

Hello,

Ok, I didn’t know this, but apparently, we’ve had to lock down
imagemagick for the time being, as it’s causing security issues on our
servers. So, at this time, imagemagick isn’t available.

Sorry about that. I wish there was more I could do for you.

If you need anything else, please let us know.

Thanks!
Brian