[Apache 2.0/Ruby] Premature end of script headers *closed

strolch00

redraft.de
ID: 155297
L
21 April 2006
1.684
72
Hi @all,

also ich habe ruby auf dem Server installieren lassen. Jetzt gibt es aber probleme bei dem Script. Immer wenn ich das Script aufrufe bekomme ich:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
[no address given] and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<p>Additionally, a 500 Internal Server Error
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.2.0 (Linux/SUSE) Server at redraft.de Port 80</address>
</body></html>

Die test.rb enthält:
PHP:
#!/usr/bin/ruby -w

10.times do |i|
  print i
end
und liegt im verzeichnis cgi-bin. Auf dem Verzeichnis und den Dateien sind die Rechte 755.

Und der Antwortheader vom Server lautet:
Date: Thu, 08 Feb 2007 17:37:31 GMT
Server: Apache/2.2.0 (Linux/SUSE)
Content-Length: 0
Connection: close
Content-Type: text/plain

500 Internal Server Error

Suexec2 liefert immer:
[2007-02-08 17:47:35]: uid: (647/web1) gid: (647/647) cmd: test.rb

Jetzt bin ich mit meinem Latein am ende und weis nicht woran es liegen kann das die Ruby Datei nicht ausgeführt wird. Eigentlich stimmt alles. Undich glaube nicht das es am Script liegt.

gruß strolch00

Btw. ruby liegt in diesem Pfad
Hoffe mal das ist das richtige Forum wenn nicht bitte verschieben.
 
Zuletzt bearbeitet:
Bei mir lokal läuft das Ding auch nur mit

ruby test.rb ("0123456789")
aber nicht mit
./test.rb
(
Code:
./test.rb: line 4: 10.times: command not found
./test.rb: line 4: i: command not found
Warning: unknown mime-type for "i" -- using "application/*"
Error: no such file "i"
./test.rb: line 6: end: command not found
)

hmmpf ;)