Attachment_fu and ImageScience - problem with RubyInline gem

Hi,

I am experiencing the following error when I configure attachment_fu
to use ImageScience.

I have downloaded and compiled FreeImage, and installed the
ImageScience (1.1.3) gem (which installs the RubyInline gem 3.6.6).

Any advice or pointers to other help would be very much appreciated. I
have spent several hours trying to fix this with no success.

Thanks!

Error output:

SystemExit (ERROR: Can’t find header dir for ruby. Exiting…):
/usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:385:in
abort' /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:385:inbuild’
/usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:679:in
inline' /usr/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/ image_science.rb:84 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:ingem_original_require’
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:495:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:495:inrequire’
/home/leelon/workspace/Pingee/vendor/plugins/attachment_fu/lib/
technoweenie/attachment_fu/processors/image_science_processor.rb:1
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:203:in load_without_new_constant_marking' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:203:inload_file’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:202:inload_file’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:94:in require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:248:inload_missing_constant’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:452:in const_missing' /home/leelon/workspace/Pingee/vendor/plugins/attachment_fu/lib/ technoweenie/attachment_fu.rb:87:inconst_get’
/home/leelon/workspace/Pingee/vendor/plugins/attachment_fu/lib/
technoweenie/attachment_fu.rb:87:in `has_attachment’
/home/leelon/workspace/Pingee/app/models/picture_attachment.rb:6

[email protected] wrote:

Hi,

I am experiencing the following error when I configure attachment_fu
to use ImageScience.

I have downloaded and compiled FreeImage, and installed the
ImageScience (1.1.3) gem (which installs the RubyInline gem 3.6.6).

Any advice or pointers to other help would be very much appreciated. I
have spent several hours trying to fix this with no success.

Thanks!

I followed the same steps and am getting the exact same error. Its very
frustrating.

Gary and others,

I finally found the solution – thanks to the great book “Ruby
Cookbook” – and Image Science is now working perfectly :slight_smile:

I was missing a Ruby library “ruby1.8-dev” (header files for compiling
extension modules for the Ruby 1.8). It can be easily installed
through your distro’s package manager tool or using:

sudo apt-get install ruby1.8-dev

Note I am running “ruby 1.8.6 (2007-06-07 patchlevel 36) [x86_64-
linux]”

RubyInline requires this package.

I hope this solves your problem too.