From: Shea Martin Date: 2007-01-27T04:55:10+09:00 Subject: Re: ebedded: calling a C function from script. > According to one of your previous posts, you use rb_load_file to load a file, > of course thinking that that was the C function corresponding to the > ruby 'load' method. The problem is that this is not true. The C function > corresponding to 'load' is rb_load, which takes one VALUE (the name of the > file, as a ruby string) and one int (analogous to the second parameter of the > ruby load method). Of course you could use the function corresponding > to 'require', rb_require, which takes a char* argument with the name of the > file. So, you should replace the code > > rb_load_file( "test.rb" ) > > with > > rb_load(rb_str_new2("test.rb"),0); > > or with > > rb_require("test.rb"); > > I hope this solves your problem > > Stefano > I had fixed the problem using rb_require. Would it be better to use rb_load? rb_load is not mentioned in the pick axe book... which again brings up the question of if anyone knows of a reference for the ruby embedded API. Thanks, ~S