trouble with ruby_options() on win32 and ruby 1.8.2

D

David Craine

I'm trying to embed ruby into a win32 application; however, when
calling the ruby_options() method my process simply hangs. I am trying
to use ruby_options() to pass the -C argument to ruby to set the
current directory. My code looks like this:

UINT launchRuby()
{
char *argv[3] =
{
"ruby",
"-C..\\Release",
"test.rb"
}

ruby_init();
ruby_options(3, argv);
ruby_run();
}

My program compiles and links properly; however, when I run it it just
hangs right after the ruby_options() call (I've integrated some
diagnostic code to determine this). This same technique worked fine on
OSX, so I'm wondering if there is some issue with the Windows platform.
 
N

nobu.nokada

Hi,

At Wed, 19 Jan 2005 05:41:58 +0900,
David Craine wrote in [ruby-talk:127054]:
I'm trying to embed ruby into a win32 application; however, when
calling the ruby_options() method my process simply hangs. I am trying
to use ruby_options() to pass the -C argument to ruby to set the
current directory. My code looks like this:

Which version do you use? Since last november, ruby_options()
ignores argc and argv on win32, and reads the command line from
the system.
 

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

Forum statistics

Threads
473,882
Messages
2,569,949
Members
46,271
Latest member
ElmaBarta

Latest Threads

Top