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

**URL:** <https://www.ruby-forum.com/t/cant-convert-magick-gravitytype-into-integer/62447>\
**Category:** Rails\
**Created:** [June 4, 2006, 11:01pm UTC](https://www.ruby-forum.com/t/cant-convert-magick-gravitytype-into-integer/62447 "2006-06-04T23:01:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@shinji](https://www.ruby-forum.com/u/shinji)\
**Post date:** [June 4, 2006, 11:01pm UTC](https://www.ruby-forum.com/t/cant-convert-magick-gravitytype-into-integer/62447/1 "2006-06-04T23:01:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shinji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@shinji](https://www.ruby-forum.com/u/shinji)\
**Post date:** [June 8, 2006, 11:34pm UTC](https://www.ruby-forum.com/t/cant-convert-magick-gravitytype-into-integer/62447/2 "2006-06-08T23:34:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![shinji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@shinji](https://www.ruby-forum.com/u/shinji)\
**Post date:** [June 9, 2006, 12:17am UTC](https://www.ruby-forum.com/t/cant-convert-magick-gravitytype-into-integer/62447/3 "2006-06-09T00:17:43Z")

</div>

John D. wrote:

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

Yes! That’s promising. Any ideas?

---

<div class="post-metadata">

**Author:** ![shinji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@shinji](https://www.ruby-forum.com/u/shinji)\
**Post date:** [June 9, 2006, 12:22am UTC](https://www.ruby-forum.com/t/cant-convert-magick-gravitytype-into-integer/62447/4 "2006-06-09T00:22:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![shinji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@shinji](https://www.ruby-forum.com/u/shinji)\
**Post date:** [June 12, 2006, 6:00pm UTC](https://www.ruby-forum.com/t/cant-convert-magick-gravitytype-into-integer/62447/5 "2006-06-12T18:00:22Z")

</div>

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
