[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

$: from C or from ruby

André

5/29/2008 6:34:00 PM

Hello,

I'm inspecting the value of $: (the 'require' path) under windows. If
I do it from the ruby interpreter or irb, I get:

["c:/devel/ruby/lib/ruby/site_ruby/1.8", "c:/devel/ruby/lib/ruby/
site_ruby/1.8/i386-msvcrt", "c:/devel/ruby/lib/ruby/site_ruby", "c:/
devel/ruby/lib/ruby/1.8", "c:/devel/ruby/lib/ruby/1.8/i386-mswin32",
"."]

which is the correct path. But if I do it from a C program where I am
embedding the ruby interpreter (after calling ruby_init() and
ruby_init_loadpath()), I get:

["C:/WINDOWS/system32/lib/ruby/site_ruby/1.8", "C:/WINDOWS/system32/
lib/ruby/site_ruby/1.8/i386-msvcrt", "C:/WINDOWS/system32/lib/ruby/
site_ruby", "C:/WINDOWS/system32/lib/ruby/1.8", "C:/WINDOWS/system32/
lib/ruby/1.8/i386-mswin32", "."]

which is WRONG, since it is replacing my ruby path (c:/devel/ruby) by
the windows dll path (C:/WINDOWS/system32).

Why is that, and how can I correct this?

Regards,

André