Capistrano, Subversion, and Sybase

TechStuff Rails

Thu Apr 24 17:02:00 -0700 2008

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:

HTML parse error: 
<code>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"
</code>

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.

blog comments powered by Disqus