I try to embed Ruby in C, and it works fine.
But if there is 'requre" in ruby, it won't work.
The test source code is here:

#include <ruby.h>

int main()
{
  int state;

  ruby_init();

  rb_eval_string_protect("require 'test/unit'\nputs 'Ruby Test'", &state);
 
  if (state) {
    VALUE c = rb_funcall(rb_gv_get("$!"), rb_intern("to_s"), 0);
    printf("Error: %s\n", RSTRING(c)->ptr);
  }

  return 0;
}

It will complain "No such file to load -- test/unit" (Test::Unit),
which is installed and works fine in normal ruby application.

Did I miss something ?

Thanx a lot.

Yen-Ju