LD_LIBRARY_PATH and Dreamhost

43 views
Skip to first unread message

Emanuel Carnevale

unread,
Nov 9, 2008, 12:39:49 PM11/9/08
to phusion-...@googlegroups.com
Hi all,
Does anyone know how to set a path on Dreamhost?
I have a custom install of ImageMagick and rmagick gem that works
flawlessly from irb and the shell, but it doesn't work under
passenger.

I've tried ENV['LD_LIBRARY_PATH']='/home/
username/local/lib' in my config.ru file, but it doesn't yield any
good result..,

any clue?

Thanks in advance,
regards
Emanuel

Dallas Kashuba

unread,
Nov 17, 2008, 7:00:59 PM11/17/08
to phusion-...@googlegroups.com
I don't know how Passenger handles environment variables but it's
possible SetEnv would work from a .htaccess file....

http://httpd.apache.org/docs/2.2/mod/mod_env.html#setenv

Let us know if it works.

Dallas

Lennon Day-Reynolds

unread,
Nov 19, 2008, 2:39:33 PM11/19/08
to Phusion Passenger Discussions
On Nov 17, 4:00 pm, Dallas Kashuba <dal...@dreamhost.com> wrote:
> I don't know how Passenger handles environment variables but it's  
> possible SetEnv would work from a .htaccess file....
>
> http://httpd.apache.org/docs/2.2/mod/mod_env.html#setenv
>
> Let us know if it works.

In my experience, SetEnv *won't* work, since those values are only
picked up by processes forked by the Apache worker processes, rather
than the master (which is in turn the parent of the Passenger parent
process).

The more reliable solution, in my experience, is to set the
PassengerRuby path to a wrapper script which sets LD_LIBRARY_PATH (or
any other needed environment vars) before exec'ing your choice of Ruby
runtimes.

-Lennon

Dallas Kashuba

unread,
Nov 21, 2008, 1:23:26 AM11/21/08
to phusion-...@googlegroups.com


Hmm, that's too bad. The PassengerRuby setting can only be set once
for the entire Apache. We could do that for customers using our
DreamHost PS servers, but not on shared servers (since Apache settings
are shared across several customers).

If one of our customers is interested, on a DreamHost PS server, and
willing to work with us on it, we can get something going.

Dallas


Reply all
Reply to author
Forward
0 new messages