@The OP:

Embedding the Ruby interpreter isn't that difficult, but there are
tools to make it easier. For example, the Rice library
(http://rice.rubyforge.org) has the VM class that makes it trivially
easy to embed:

Rice::VM *vm = new Rice::VM(argc, argv);

now you're free to call whatever ruby calls you want, as well as Rice
objects and other wrapping you may need to do. Rice will also do the
necessary cleanup when the VM object is destroyed.

@Ivan:

You can only run the Ruby VM in a single thread.

Jason R.