Building Ruby Extensions with Rake

Posted by code_monkey_steve on Sep 8, 2006 Sep 8

At the moment, the tasks are a part of the RDBXML project, hosted by RubyForge . There is documentation, and you can view the latest version in SVN here.

Usage is simple enough:

{% highlight ruby }
require ‘rake/swigextensiontask’
desc “Build the BDB interface extension” :db do |t|
t.dir = ‘ext’
t.link_libs += [‘db’, ‘db_cxx’]
endhighlight %}

This will build, from the db.i SWIG interface file in the ext directory, linking-aginst and For a full usage example, see the Rakefile for RDBXML.