A
Andre Nathan
Hello
I'm trying to use the json gem from a C extension. Doing this fails with
"no such file to load -- json (LoadError)":
rb_require("rubygems");
rb_require("json");
However, if I add
rb_funcall(rb_mKernel, rb_intern("gem"), 1, rb_str_new2("json"));
before rb_require("json"), then it works fine. Is that how it's supposed
to work?
Thanks,
Andre
I'm trying to use the json gem from a C extension. Doing this fails with
"no such file to load -- json (LoadError)":
rb_require("rubygems");
rb_require("json");
However, if I add
rb_funcall(rb_mKernel, rb_intern("gem"), 1, rb_str_new2("json"));
before rb_require("json"), then it works fine. Is that how it's supposed
to work?
Thanks,
Andre