From: Joel VanderWerf Date: 2008-12-03T06:12:53+09:00 Subject: Re: crate 0.1.1 Released Jeremy Hinegardner wrote: > On Tue, Dec 02, 2008 at 11:04:32AM +0900, Luis Lavena wrote: ... >> I'll need to check it out how it works with gems that depends on >> extensions, since dlopen / LoadLibrary needs a real file and cannot >> map a memory address to load the symbols (just thinking out loud here, >> maybe you already figured this out). > > You might call it cheating, what I do is clear out $LOAD_PATH after > initializing the interpreter and before handing off control to the > wrapped up ruby application. The require order is then, the ruby > original require followed by the amalgalite overridden require. > > That way, if the require is a loaded module (which is now statically > compiled in) the ruby internal rb_require() will return success, and if > it is a .rb file LoadError will be raised and then amalgalite will take > care of loading the appropriate file from the sqlite database. So, still wondering about Luis's question... how do you load extensions? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407