When I run as user, my .bashrc has the following line:

source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

At the server, my mongrel_rails script sets the ORACLE_HOME variable (zealots, beware, this hack is really ugly):

more /usr/local/bin/mongrel_rails
#!/usr/local/bin/ruby
#
# This file was generated by RubyGems.
#
# The application 'mongrel' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0"

ENV['ORACLE_HOME'] = '/usr/lib/oracle/xe/app/oracle/product/10.2.0/server'

if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
  version = $1
  ARGV.shift
end

gem 'mongrel', version
load 'mongrel_rails'


# EOF


Ugly but works nicely :)

Cheers,

filipe

On Thu, 2 Oct 2008, Greg Clarke wrote:

.bashrc runs for interactive shells only.

To see your full set of interactive env vars enter:

env

or

env | sort


You could view and set env vars in the script that is called at boot
time to start the mongrels.

Inside that script you can examine the process's environment variables
(echo $LD_LIBRARY_PATH  to the log) and set them using the same syntax
as in the .bashrc.

I expect you will also have to set some other Oracle-related env vars
- grep for ORACLE amongst your env vars to see what you are using
interactively.

All this should be pretty straightforward to your Oracle DBA if you
have one around.

On Thu, Oct 2, 2008 at 12:20 AM, Chris Gers32 <[EMAIL PROTECTED]> wrote:
Hi Greg,

Yes indeed, I set LD_LIBRARY_PATH in user "chris"'s .bashrc file:

export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/11.1.0.1/client/lib

But since the processes run as the same user, I thought it would be OK.

Where should I set this variable instead, and by the way, how do I list
the boot-time environment variables? As you can see, I'm not much of a
Linux guru...

I appreciate your help,

Chris.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


filipe {
 @              icewall.org
 GPG         1024D/A6BA423E
 http://filipe.icewall.org/
}

_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to