As DH refused to install new version of RMagick gem “globally” I had
to install it locally. Here my install details:
Local gems installed in:
/home/user/.gems
/home/user/.gems/gems/rmagick-1.14.0
Local libs installed in:
/home/user/lib
My app located in:
/home/user/apps/tptest/current
On top of my config/enviroment.rb:
ENV[‘GEM_PATH’] = ‘/home/user/.gems:/usr/lib/ruby/gems/1.8’
ENV[‘GEM_HOME’] = ‘/home/user/.gems’
My .bashrc and .bash_profile:
~/.bash_profile: executed by bash(1) for login shells.
umask 002
PS1='[\h]$ ’
export PATH=/home/user/bin:$PATH
export GEM_PATH=/home/user/.gems:/usr/lib/ruby/gems/1.8
export GEM_HOME=/home/user/.gems
export LD_LIBRARY_PATH=/home/user/lib
~/.bashrc: executed by bash(1) for non-login shells.
export PATH=/home/user/bin:$PATH
export GEM_PATH=/home/user/.gems:/usr/lib/ruby/gems/1.8
export GEM_HOME=/home/user/.gems
export LD_LIBRARY_PATH=/home/user/lib
When I run my scripts from console the local version gets loaded:
[jurupa]$ ruby script/console
require_gem ‘rmagick’
=> true
require ‘RMagick’
=> true
Magick::Long_version
=> “This is RMagick 1.14.0 ($Date: 2006/09/27 21:26:35 $) Copyright
(C) 2006 by Timothy P. Hunter\nBuilt with ImageMagick 6.2.9 10/03/06
Q16 http://www.imagemagick.org\nBuilt for ruby 1.8.2 (2005-04-11)
[i386-linux]\nWeb page: http://rmagick.rubyforge.org\nEmail:
[email protected]\n”
When I run it “live” from web I get the following exception:
RMagick.rb:28: uninitialized constant Magick::Enum (NameError)
Browsing the web reveals that it should be a problem of:
LD_LIBRARY_PATH
That is why I use:
export LD_LIBRARY_PATH=/home/user/lib
in .bashrc
AND
PassEnv LD_LIBRARY_PATH
in .htaccess
Still no luck. Are there any other issues I’m missing? It seems like
FastCGI is not “using” the correct LD_LIBRARY_PATH… HELP!