ruby + apache. need to export path=/opt/ruby/bin every time beforestarting apache

Discussion in 'Ruby' started by ad, Dec 28, 2009.

  1. ad

    ad Guest

    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.
    ad, Dec 28, 2009
    #1
    1. Advertising

  2. ad

    Ryan Davis Guest

    Ryan Davis, Dec 28, 2009
    #2
    1. Advertising

  3. ad

    ad Guest

    Re: ruby + apache. need to export path=/opt/ruby/bin every timebefore starting apache

    On Dec 28, 5:19 pm, Ryan Davis <> wrote:
    > 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



    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
    ad, Dec 29, 2009
    #3
  4. ad

    Ryan Davis Guest

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

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

    > On Dec 28, 5:19 pm, Ryan Davis <> wrote:
    >> 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

    >
    >
    > 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


    you could modify /etc/profile instead.
    Ryan Davis, Dec 29, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sweety
    Replies:
    9
    Views:
    1,019
    Richard Heathfield
    Feb 7, 2006
  2. Greg Millam
    Replies:
    1
    Views:
    80
  3. anne001
    Replies:
    1
    Views:
    438
  4. anne001
    Replies:
    2
    Views:
    133
    anne001
    Jun 27, 2006
  5. Ittay Dror
    Replies:
    1
    Views:
    111
    Nobuyoshi Nakada
    Dec 7, 2008
Loading...

Share This Page