Script/server mongrel on windows

Supposedly the latest edge rail supports mongrel via script/server. I
have mogrel all installed and working when called via:

mongrel_rails service::start -N mw_dev_server

However when I do:

ruby script/server mongrel

I get:

PROBLEM: Mongrel is not available on your system (or not in your path)

Upon further investigation, it appears that mongrel prevents itself from
loading on windows with the following lines:

unless RUBY_PLATFORM !~ /mswin/ && !silence_stderr { mongrel_rails
}.blank?
puts “PROBLEM: Mongrel is not available on your system (or not in
your path)”
exit 1
end

From:
http://dev.rubyonrails.org/browser/trunk/railties/lib/commands/servers/mongrel.rb

Why is does it prevent itself form loading on windows? It seems
lighttpd does this same thing. IS it possible to get this running on
windows, and I am just missing something silly?

Alex W. wrote:

Supposedly the latest edge rail supports mongrel via script/server. I
have mogrel all installed and working when called via:

mongrel_rails service::start -N mw_dev_server

However when I do:

ruby script/server mongrel

I get:

PROBLEM: Mongrel is not available on your system (or not in your path)

Why is does it prevent itself form loading on windows? It seems
lighttpd does this same thing. IS it possible to get this running on
windows, and I am just missing something silly?

Upon further investigation, it appears that ruby doesn’t execute
commands very well on the windows command line. Webrick servers are
created entirely in the ruby script which is why they work just fine.

c:\foo> mongrel_rails start

Mongrel starts just fine

c:\foo> irb

mongrel_rails start
Errno::ENOEXEC: Exec format error - mongrel_rails start
from (irb):1:in ``’
from (irb):1

So does this mean ruby is blame for locking windows out of these
development server options?

I found when I need to execute a command that was on both windows/linux
(on
being .sh the other being .com) and both were on the paths correctly
(would
run fine at the prompt) I still needed to make ruby happy at this point.
I
did a check to see if I was running in windows, and if I was, I stuck a
‘.com’ on the end of the command and it worked.

This may or may not help with mongrel, haven’t tried it yet. But this is
my
experince with Ruby and executing stuff on windows.

-Nick

Nick S. wrote:

I found when I need to execute a command that was on both windows/linux
(on
being .sh the other being .com) and both were on the paths correctly
(would
run fine at the prompt) I still needed to make ruby happy at this point.
I
did a check to see if I was running in windows, and if I was, I stuck a
‘.com’ on the end of the command and it worked.

This may or may not help with mongrel, haven’t tried it yet. But this is
my
experince with Ruby and executing stuff on windows.

-Nick

Doesn’t seem to be any help. The mongrel gem does not include a com
file so I just get a file not found error:

script/server: No such file or directory - mongrel_rails.com start -p
3000 -a 0.0.0.0

Jeff C. wrote:

There’s a patch waiting to be committed, #5499, which should fix the
problem on win32.

Superswank.

Works perfectly. Thanks for the heads up.

There’s a patch waiting to be committed, #5499, which should fix the
problem on win32.