Difference between revisions of "Ruby"

From Open Babel
Jump to: navigation, search
 
(Added Rich's blog entry)
Line 5: Line 5:
 
The Ruby interface is auto-generated, including a Makefile which uses <code>extconf.rb</code>.
 
The Ruby interface is auto-generated, including a Makefile which uses <code>extconf.rb</code>.
  
The Makefile can be updated, if needed:
+
To generate the Makefile:
 
<pre>
 
<pre>
 
% ruby extconf.rb --with-openbabel-include=/usr/local/include/openbabel-2.0
 
% ruby extconf.rb --with-openbabel-include=/usr/local/include/openbabel-2.0
Line 19: Line 19:
 
require 'openbabel'
 
require 'openbabel'
 
</pre>
 
</pre>
 +
 +
==More Info==
 +
 +
Rich Apodaca has blogged about the Ruby interface:
 +
* [http://depth-first.com/articles/2007/04/09/painless-installation-of-ruby-open-babel Painless Installation]
  
 
[[Category:Developer]]
 
[[Category:Developer]]

Revision as of 16:15, 16 April 2007

Starting with Open Babel 2.1, an experimental Ruby interface to the Open Babel library is available.

Compilation

The Ruby interface is auto-generated, including a Makefile which uses extconf.rb.

To generate the Makefile:

% ruby extconf.rb --with-openbabel-include=/usr/local/include/openbabel-2.0
% make

Running

The Ruby interface can be run via ruby or interactive use via irb

% irb
require 'openbabel'

More Info

Rich Apodaca has blogged about the Ruby interface: