Forum: Ruby on Rails Setting env vars from within a Rails app?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Raymond B. (Guest)
on 2006-03-12 02:31
(Received via mailing list)
Greetings! I'm trying to set an environment variable in Rails. Why? I
can't use RMagick unless I do so. I can do it from the shell, run irb,
and then require 'RMagick' works. So far so good. But how can I do
this from my application?

I'm on a shared host so I've put in a ticket to have something like
this added to httpd.conf:

SetEnv LD_LIBRARY_PATH /usr/local/lib

That would probably fix it. I've tried adding it to my .htaccess with
the other settings but it doesn't seem to work. Restarted the process
and everything. Even tried adding this to environment.rb but nothing:


Is there any way to force this library path in my application? Or am I
stuck waiting for my shared hosting company to fix the issue?
This topic is locked and can not be replied to.