Created
January 5, 2011 13:21
-
-
Save mnylen/766300 to your computer and use it in GitHub Desktop.
How to get RVM + Subversion Ruby Bindings to work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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
Thanks mate, you saved my day!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another small thing when I did this again. The architecture specific files where found in i686-linux for me instead of x86_64-linux.