Re: ruby-1.8.1 win2k apache2: mod_ruby shuts off network connections
Lothar Scholz <[email protected]>
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Organization | Scriptolutions |
| Message-ID | <[email protected]> |
Hello Kaspar,
Tuesday, December 23, 2003, 10:16:23 PM, you wrote:
KS> Tried that out; looked very promising. I am sorry, but this does not
KS> work: I have set the windir variable in my system settings. I even
KS> undefined it just for kicks and was still able to access the net from
KS> the console, and with it I wasn't from within Apache.
If found this error while hacking on my Ruby/Python IDE. When i
removed all system environment variables (only leaving the CGI ones)
and tried to open a socket (to the debugger) the socket subsystem was
not working anymore.
Can you open a socket from your script with a connection to any other
place ? What's the exact windows error code ? Try also to open a
socket to a non existing IP number. I would like to know if it returns
a can't connect or something else.
KS> Do you think that the fact that I am not able to compile mod_ruby under
KS> win2k myself means bad luck ? That's the feeling I am getting right now.
KS> Have you managed to run mod_ruby under windows ? How ? (Compiler or
KS> location of binaries)
No 'Traz' who is also on this email list send me a description how to
get mod_ruby running under windows. But i didn't found the time to try
it out (i'm just back from a 6 weeks holiday in south-east asia).
Here is what he wrote (maybe it helps):
=================================================
One word about ModRuby for windows : in recent day, Moriq (the
developper of Ruby/Apollo interface with Deplhi GUI) as compiled the
mod_ruby for Windows environement !! check it at
http://www.moriq.com/ruby/win32-apache2-ruby1.8.1-mod_ruby/ ... if you
know C, how-to compile is included.
I've try it on Apache 2.0.48 on windows, but after few crisis for
cheking what's wrong : ) : ) ... it's seems it'll work if you got the
eruby.rb file ... those i don't have : (
So if you want to try :
-download mod_ruby.so at Moriq web
-download mod_ruby 1.1.1 at modruby web
-configure appache conf by adding some few lines like this
LoadModule ruby_module modules/mod_ruby.so
AddType application/x-hhtpd-eruby .rhtml
<IfModule mod_ruby.c>
RubyRequire apache/ruby-run
<FilesMatch ".rbx">
Options ExecCGI Includes
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</FilesMatch>
RubyRequire apache/eruby-run
<FilesMatch ".rhtml">
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</FilesMatch>
# RubyRequire auto-reload pour le debug
</IfModule>
Puts one file test in the /cgi-bin directory of apache (one test.rbx :
script and one test2.rhtml : embeded ruby in html).
Ok and at this point you've got an error with .rbx file : permission
denied. After some look, it seems that the ruby-run.rb (in
ruby/lib/1.8/apache lib) have a test on executable file type ... and
this is for unix system. So, i've put thoses lines in commentary.
And the second point : is that the eruby-run.rb require eruby.rb ....
and i haven't found nowhere this file !!! (checked the mod_ruby and
eruby pack on modruby.net).
So i'm here for the moment : ) i'm waiting for some help on ML or on IRC
chat.(in french i whispe ... too bad english)
But we're not long from a full port of mod_ruby on windows i think : )
So, 'waiting for more news !!!
====================================================
Just a word for telling that i'm success in ruby script .. partially : )
I take another httpd.conf apache with this (non reference to eruby) :
LoadModule ruby_module modules/mod_ruby.so
and it's all ...
then i've test a test.cgi file in the cgi-bin apache directory :
test.cgi
#! c:\ruby\bin\rubyw.exe
temp="hello"
puts "Content-type: text/plain\n\n"
puts "testing #{temp} ..."
and it's done !!!!
... well ... now looking for eruby : )
bye
=======================================================
--
Best regards,
Lothar mailto:[email protected]