Error with Mongrel_cluster

Hi Guys,
I¹m getting this error with mongrel_cluster. I am able to start mongrel
through mongrel_rails start but the cluster is not working. Initially
mongrel_rails wouldn¹t work but after I added $ORACLE_HOME and
$PD_LIBRARY_PATH variables it worked but mongrel_cluster isn¹t working
still. The mongrel log file looks like below.
Any help is appreciated.
Thanks.

-----------begin mongrel.8000.log---------------
** Daemonized, any open files are closed. Look at
tmp/pids/mongrel.8000.pid
and log/mongrel.8000.log for info.
** Starting Mongrel listening at 0.0.0.0:8000
** Changing group to xxxxx.
** Changing user to xxxxx.
** Starting Rails with production environment…
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection
_adapters/oracle_adapter.rb:536: undefined method define_a_column' for classOCI8::Cursor’ (NameError)
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependenc ies.rb:495:inrequire’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependenc
ies.rb:342:in new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependenc ies.rb:495:inrequire’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record.rb:81
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record.rb:80
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:162:inrequire_frameworks’
… 10 levels…
from
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in run' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:inrun’
from
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
from /usr/bin/mongrel_rails:16

--------------------------end log ------------------------------------

On 10/1/07, Sid J. [email protected] wrote:

Hi Guys,
I’m getting this error with mongrel_cluster. I am able to start mongrel
through mongrel_rails start but the cluster is not working. Initially
mongrel_rails wouldn’t work but after I added $ORACLE_HOME and
$PD_LIBRARY_PATH variables it worked but mongrel_cluster isn’t working
still. The mongrel log file looks like below.
Any help is appreciated.
Thanks.

Sid,

See if you can startup the console without errors. Then see if you can
start
a single instance without errors. This does not appear to be a Mongrel
related issue but instead something missing or incorrectly configured in
the
application.

$PD_LIBRARY_PATH or $LD_LIBRARY_PATH?
or is it just a typo ?
I have faced this problem is past but setting these two correctly does
the
trick. Are u sure u did add these variables in your .bashrc ?

** Changing group to xxxxx.
** Changing user to xxxxx.
Guess this is what the problem is
Did you set those variables for those userspace also ?

On 10/1/07, Wayne E. Seguin [email protected] wrote:

Thanks.

Also, are you also making sure that you use "export " when assigning
the $ORACLE_HOME
and $PD_LIBRARY_PATH variables? (assuming you’re using bash)

Guys,
Thanks for the replies.
This is how my .bashrc looks like

-----begin .bashrc …

more .bashrc
#/etc/profile: system-wide .profile file for the Bourne shell (sh(1))

and Bourne compatible shells (bash(1), ksh(1), ash(1), …).

ORACLE_HOME=/usr/lib/oracle/10.2.0.3/client
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/usr/lib/oracle/10.2.0.3/client/bin
LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.3/client/lib
export ORACLE_HOME
export LD_LIBRARY_PATH
if [ “$PS1” ]; then
if [ “$BASH” ]; then
PS1=‘>’
fi
fi

umask 022

I follow these instructions to setup my mongrel_cluster
http://mongrel.rubyforge.org/docs/mongrel_cluster.html

The mongrel_cluster and mongrel_rails both worked fine, but my
supervisor
installed oci8 or oracle and then when i try to start mongrel_rails it
would
give me the same error. Googling it led me to add the environment
variables
$ORACLE_HOME and $LD_LIBRARY_PATH , after that mongrel_rails works.
But mongrel_cluster is still broken and I’m not sure what more do I need
to
do to get it back running. I must be missing something about
mongrel_cluster.

My setup is Ubuntu 6.06.1 LTS , nginx (webserver) ruby 1.8.4
Thanks.

On 10/1/07, Sid N. [email protected] wrote:

mongrel_cluster.

My setup is Ubuntu 6.06.1 LTS , nginx (webserver) ruby 1.8.4
Thanks.

Sid,

I would try to re-install (or install if you don’t have it) the oci8
adaptor
to force it to rebuild against the new oracle installation.

sudo gem uninstall ruby-oci8
sudo gem install ruby-oci8

http://rubyforge.org/projects/ruby-oci8/

Let us know if this works.

Best,

~Wayne

On 10/1/07, Sid N. [email protected] wrote:

Wayne,
surprisingly i’m getting this error now:

You can download the gem manually from here and install from local:
http://rubyforge.org/frs/?group_id=256&release_id=12694

The ruby-oci8 project page is here:
http://ruby-oci8.rubyforge.org/en/

For example, on Linux you might do:
wget
http://rubyforge.org/frs/download.php/22320/ruby-oci8-1.0.0-rc3.tar.gz
tar zxvf ruby-oci8-1.0.0-rc3.tar.gz
cd ruby-oci8-1.0.0-rc3
make
sudo make install

I hope this helps.

~Wayne

Wayne,
I tried the below and still it won¹t work.

Wayne,
surprisingly i’m getting this error now:
--------------begin error-----------------

sudo gem install ruby-oci8
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find ruby-oci8 (> 0) in any repository
---------end error -----------------------------