Jabberwocky

ImageScience and inline ruby

Posted in rails by elisehuard on September 22, 2008

Just thought i’d mention a link that saved me a couple of hours this morning: if your mongrel does this on ImageScience invocations:
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:73:in `exit'
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:73:in `rootdir'
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:87:in `directory'
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:257:in `so_name'
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:297:in `load_cache'
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:708:in `inline'
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:84
...

It means it doesn’t find an environment variable INLINEDIR (or HOME, actually). It’s used in the context of inline invocation of the FreeImage library (freeimage-VERSION.so). The function of this INLINEDIR directory is unclear to me, so i’ll need to look into the whole RubyInline thing.

How to fix this: in config/environments/production.rb:
#Ruby Inline Permissions Hackery
ENV['INLINEDIR'] = RAILS_ROOT + “/tmp/.ruby_inline”

Thank you, thank you Mandarin Soda !

Advertisements
Tagged with: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: