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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: