Ruby + apache. need to export path=/opt/ruby/bin every time before starting apache

Hi,
I have installed apache 1.3 and ruby 1.8. I am running some ruby files
through the browser.

Before I start apache I always have to do:
export PATH=/opt/ruby/bin:$PATH

If I dont export the ruby path (I have installed ruby under /opt/ruby)
and start apache, then I get an internal server error every time I
access the file.

If I export the path manually and then restart apache I am able to
access the ruby file just fine.

Is there a way to set up this variable through apache?

thanks.

On Dec 28, 2009, at 13:20 , ad wrote:

Is there a way to set up this variable through apache?

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

On Dec 28, 5:19 pm, Ryan D. [email protected] wrote:

On Dec 28, 2009, at 13:20 , ad wrote:

Is there a way to set up this variable through apache?

mod_env - Apache HTTP Server Version 2.2

Looks like there is a bug in mod_env which doesnt take the modified
path.
https://issues.apache.org/bugzilla/show_bug.cgi?id=43906

I eventually modified apachectl script and added the path in the
configuration section.
PATH=$PATH:/opt/ruby/bin ;
export PATH

On Dec 28, 2009, at 17:35 , ad wrote:

43906 – SetEnv does not allow PATH override

I eventually modified apachectl script and added the path in the
configuration section.
PATH=$PATH:/opt/ruby/bin ;
export PATH

you could modify /etc/profile instead.