Installing Ruby SVN bindings

Oct 25, 2005 8 comments

I spent three days off and on (mostly off) trying to figure this out, so I thought it would be nice to lay out the process. I wanted to install Collaboa, a useful Rails webapp for developing with Subversion online that is similar to Trac. In order to get it working there is one important dependency: the Ruby SVN bindings. Here’s how I got it to work (at least on OS X):

  • Download swig-1.3.25 (the version here is crucial, do not get the latest version)
  • Untar/zip the package, cd into the directory, and execute
    • ./configure
    • make
    • sudo make install
  • Download the latest source of Subversion
  • Untar/zip the package, cd into the directory, and execute
    • ./configure
    • make
    • sudo make install
  • Still in the subversion top-level directory execute
    • make swig-rb
    • make check-swig-rb
    • sudo make install-swig-rb

That should take care of it, but in order to make sure everything is installed correctly, open up irb and type require 'svn/core'. If irb returns true you’re all set!

8 comments


Garrett said 4 months later:

Yeah, this doesn’t work at all for me. I can’t seem to make swig-rb or check-swig-rb now matter how many times I try. I literally spent 4 hours on this today. Ugh. Running 10.4.5, Ruby 1.8.4, Swig 1.3.25, SVN 1.3.0. Everything installed fine except making swig-rb errors:

make: * [subversion/bindings/swig/ruby/svn_client.lo] Error 1

What a pain. Oh well, no Collaboa for me.

Garrett said 4 months later:

Well, I was FINALLY able to fix this. When configuring SVN, I did:

./configure—with-swig=/usr/local/bin/swig

And then made and installed SVN, then make swig-rb was able to run. check-swig-rb didn’t work, but the install did and the require in IRB was true.

Luis said 6 months later:

Great, thanks!

Matt said 9 months later:

Thanks a ton for this! I did this for the first time a while back on my own (it also took me about 3 days), but wasn’t smart about it and so I didn’t post it for posterity and sharing.

Needless to say, I couldn’t remember how I did it so many months ago, so this was a lifesaver! (including Garrett’s config trick). Much appreciated.

eastviking said about 1 year later:

It is easy to configure in freebsd62: #cd /usr/ports/devel/subversion #make WITH_RUBY=yes SWIG_BINDINGS=yes WITH_MOD_DAV_SVN=yes (I meet some problem of neon,so you can add: WITHOUT_NEON=yes) one step finish,it is great!!!

eastviking said about 1 year later:

make WITH_RUBY=yes SWIG_BINDINGS=yes WITH_MOD_DAV_SVN=yes install clean

rsstites said about 1 year later:

I’m having a bit of trouble installing the subversion. I keep getting an error saying “invalid apr version found”. I’m having a bit of trouble getting the apr upgraded from 0.9.4 to 1.2.8. Any help would be appreciated.

Steven said about 1 year later:

Thanks for your comment. I had the same problem and the --with-swig parameter solved this.

Name
Url