Need help with mod_ruby under Win32

Hi,

I know there are not many people on this mailing list who use my
configuration but hope that someone can help solve my problem.

Windows XP SP1
Apache 2.0.49
mod_ruby 1.1.1
   (from http://www.moriq.com/ruby/win32-apache2-ruby1.8.1-mod_ruby/)

I've copied "lib/apache" folder from mod_ruby-1.1.3 source distribution
to "c:\ruby\lib\ruby\site_ruby\1.8" and updated httpd.conf with:

<IfModule mod_ruby.c>
  RubyRequire apache/ruby-run
  <Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </Files>
</IfModule>

Now, when I'm trying to open "http://localhost/test.rbx" I am getting
the following error:

"access to C:/Program Files/Apache Group/Apache2/htdocs/test.rbx failed
for (null), reason: file permissions deny server execution"

If I rename the file to "test.r" the browser shows it.

···

--
Thanks,
Yura.

in site_ruby/apache/ruby-run.rb and ruby-debug.rb:

~ #~ unless r.finfo.executable?
  #~ r.log_reason("file permissions deny server execution", r.filename)
  #~ return FORBIDDEN
~ #~ end

Commented out because not needed on my Windows XP SP1 machine, so you
are not alone.

I had other troubles with that setup, so I kind of gave up. Basic
mod_ruby runs fine though.

kaspar

semantics & semiotics
code manufacture

www.tua.ch/ruby

From: news [mailto:news@sea.gmane.org]On Behalf Of Kaspar Schiess
Sent: June 12, 2004 12:41

in site_ruby/apache/ruby-run.rb and ruby-debug.rb:

~ #~ unless r.finfo.executable?
  #~ r.log_reason("file permissions deny server execution",
r.filename)
  #~ return FORBIDDEN
~ #~ end

Commented out because not needed on my Windows XP SP1 machine, so you
are not alone.

Thanks, Kaspar. I am not getting this error any more.

I had other troubles with that setup, so I kind of gave up. Basic
mod_ruby runs fine though.

I'd like to get basic mod_ruby working before I give up too.
Right now Apache "freezes" (so that I have to restart it) on
the following simple "test.rbx" script:

print "HTTP/1.1 200 OK\r\n"
print "Content-Type: text/plain\r\n\r\n"
print "hello world"

···

-----Original Message-----

--
Yura.

After some debugging done, I found that Apache crashes on the
call to "setup_cgi_env" in "ruby-run.rb". I guess, it's some
incompatibility between mod_rudy.so/1.1.1 for Windows and Apache 2.0.49.

Yura.

···

-----Original Message-----
From: Iouri Kloubakov [mailto:ykloubakov@ftxs.fujitsu.com]
Sent: June 12, 2004 16:16
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of Kaspar Schiess
> Sent: June 12, 2004 12:41
> I had other troubles with that setup, so I kind of gave up. Basic
> mod_ruby runs fine though.

I'd like to get basic mod_ruby working before I give up too.
Right now Apache "freezes" (so that I have to restart it) on
the following simple "test.rbx" script:

print "HTTP/1.1 200 OK\r\n"
print "Content-Type: text/plain\r\n\r\n"
print "hello world"

I found the problem but I am not good with patches.

File: mod_ruby.c
Function: mod_ruby_clearenv()
Fix: replace call to putenv(buf) with call to ruby_unsetenv(buf)

···

-----Original Message-----
From: Iouri Kloubakov [mailto:ykloubakov@ftxs.fujitsu.com]
Sent: June 12, 2004 17:50

After some debugging done, I found that Apache crashes on the
call to "setup_cgi_env" in "ruby-run.rb". I guess, it's some
incompatibility between mod_rudy.so/1.1.1 for Windows and Apache 2.0.49.

--
Yura.