$: from C or from ruby

A

André

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é
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top