Skip to content

Instantly share code, notes, and snippets.

@mnylen
Created January 5, 2011 13:21
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnylen/766300 to your computer and use it in GitHub Desktop.
Save mnylen/766300 to your computer and use it in GitHub Desktop.
How to get RVM + Subversion Ruby Bindings to work
$ rvm use 1.8.7-p302
$ wget http://subversion.tigris.org/downloads/subversion-1.6.15.tar.gz
$ tar -xzf subversion-1.6.15.tar.gz && cd subversion-1.6.15
$ ./configure --with-ruby-sitedir=~/.rvm/rubies/ruby-1.8.7-p302/lib/ruby --without-berkeley-db
$ make swig-rb && make install-swig-rb
To test things out:
$ irb
ruby-1.8.7-p302 > require 'svn/client'
=> true
ruby-1.8.7-p302 > exit
To install RVM:
$ sudo apt-get install build-essential curl git-core ruby
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session' >> ~/.profile
$ source ~/.profile
$ rvm package install readline
$ rvm package install zlib
$ rvm install 1.8.7 --with-zlib-dir=/home/you/.rvm/usr --with-readline-dir=/home/you/.rvm/usr
$ rvm --default 1.8.7
Now the bindings
$ sudo apt-get install libsvn-ruby
$ cd /usr/lib/ruby/1.8
$ cp -R svn /home/you/.rvm/rubies/default/lib/ruby/1.8
$ cp -R x86_64-linux/svn /home/you/.rvm/rubies/default/lib/ruby/1.8/x86_64-linux/
To test things out:
$ irb
ruby-1.8.7-p330 :001 > require 'svn/client'
=> true
ruby-1.8.7-p330 :002 > exit
@archite
Copy link

archite commented Sep 15, 2011

I found this command worked for me on OS X Lion:

env CC=gcc-4.2 LDFLAGS="-L$MY_RUBY_HOME/lib" ./configure --with-ruby-sitedir=$MY_RUBY_HOME/lib/ruby --without-berkeley-db

@joustava
Copy link

joustava commented Nov 9, 2011

Thanks mate, you saved my day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment