Capistrano, Subversion, and Sybase
Posted on April 24, 2008 at 05:02 PM
I posted a few weeks ago about the troubles I had with capistrano and CVS. I got the project converted from CVS to Subversion, but the versioning was all jacked up. No worries - I'll start with version 1 in svn.
Then we got busy working on the app.
We redid a lot of functionality and made the app look more consistent. There are 3 people currently hacking on this thing. We're also using Basecamp to track the project, which is pretty nice.
Back to the subject at hand.... I had a failed attempt at capifying the project with CVS, and I held off until we got to a decent place to take another run at it. We made it to that point, so I busted out my capistrano recipes. Update the config a little.
cap deploy
It does everything it should! Sweet! The server wasn't running, though.
mongrel_rails cluster::start
Works like a charm. WTF?
I looked at the log, and there was an issue with the database adapter. We're using Sybase. There must be some environment stuff needed, and ssh doesn't load any env. I tried a few things that didn't work, so I ended up just doing this:
run "export SYBASE=/opt/bcs/packages/openclient12;
export SYBASE_OCS=OCS-12_5;
export LD_LIBRARY_PATH=$SYBASE/$SYBASE_OCS/lib:$SYBASE;
cd #{current_path} && mongrel_rails cluster::restart"
Bam!
I'm sure there is a more elegant way to make it work, but it was getting late in the afternoon and I wanted to check it off the list.
Comments
There are 0 comments on this post. Post yours →
Post a comment
Required fields in bold.