Forum: Ruby on Rails "can't convert Magick::GravityType into Integer"

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.
Max R. (Guest)
on 2006-06-05 01:01
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:in
`transform_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:in
`each_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:in
`headshot_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:in `send'
  [RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:657:in
`headshot='
  [RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:656:in `each'
  [RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:656:in
`headshot='
  [RAILS_ROOT]/vendor/plugins/trunk/lib/file_column.rb:652:in
`headshot='
  [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1510:in
`send'
  [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1510:in
`attributes='
  [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1509:in
`each'
  [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1509:in
`attributes='
  [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1438:in
`update_attributes'
  [RAILS_ROOT]/app/controllers/clients_controller.rb:22:in
`edit_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:in
`perform_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:in
`perform_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:in
`perform_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:in
`send'
  [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:in
`process_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:in `dispatch'
  [RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:150:in
`process_request'
  [RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:54:in
`process!'
  [RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:53:in
`each_cgi'
  /usr/lib/ruby/1.8/fcgi.rb:597:in `each'
  /usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
  [RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:53:in
`process!'
  [RAILS_ROOT]/vendor/rails/railties/lib/fcgi_handler.rb:23:in
`process!'
  dispatch.fcgi:24
John D. (Guest)
on 2006-06-09 01:34
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?
Max R. (Guest)
on 2006-06-09 02:17
John D. wrote:

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

Yes! That's promising. Any ideas?
John D. (Guest)
on 2006-06-09 02:22
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.
John D. (Guest)
on 2006-06-12 20:00
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
This topic is locked and can not be replied to.