Basic tech stuff

Programming and Linux administration

Embedded Ruby was quite easy

Posted by Daniel Brahneborg on 2007 February 26

I spent some time embedding the Ruby interpreter into an application today. It was a bit confusing at first, but once I made sure all method calls were surrounded by rb_protect() and stored all variables as globals to keep the garbage collector from eating them, things progressed quickly.

The fun thing is that the documentation said that it wasn’t written to be easy to embed, but it still looked a lot easier than the infinitely complex mod_perl. That says a lot about Ruby, I think.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>