From: Graham Agnew Date: 2009-04-22T00:01:46+09:00 Subject: Re: questions about embedding ruby 1.9 Do you nee to add rb_init_loadpath()? ruby_sysinit(&argc, &argv); { RUBY_INIT_STACK; ruby_init(); ruby_init_loadpath(); My own embedded ruby interpreter require's a file, and then calls functions within it. The rb_require and rb_funcall are wrapped in rb_protect. The protected rb_require allows me to log any syntax errors in the required code. The protected rb_funcall allows me to catch any exceptions. Ruby's own main.c uses something different to load the script: ruby_sysinit(&argc, &argv); { RUBY_INIT_STACK; ruby_init(); return ruby_run_node(ruby_options(argc, argv)); } Cheers, Gra. -- Posted via http://www.ruby-forum.com/.