Hi,
I''m new to rails, and apache, and going bald trying to sort out why I
am
getting 500 errors wherever I use rails.
The apache log contains the following.
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] Premature end
of script headers: dispatch.cgi
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15]
D:/ruby/lib/ruby/gems/1.8/gems/rubyzip-0.5.5/./zip/zip.rb:11: warning:
already initialized constant Tempfile\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15]
D:/ruby/lib/ruby/1.8/pstore.rb:25:in `initialize'': directory /tmp does
not exist (PStore::Error)\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/1.8/cgi/session/pstore.rb:72:in `new''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/1.8/cgi/session/pstore.rb:72:in `initialize''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/1.8/cgi/session.rb:264:in `new''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/1.8/cgi/session.rb:264:in `initialize''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.3.1/lib/action_controller/cgi
_process.rb:71:in `new''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.3.1/lib/action_controller/cgi
_process.rb:71:in `session''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.3.1/lib/action_controller/bas
e.rb:577:in `assign_shortcuts''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.3.1/lib/action_controller/bas
e.rb:259:in `process''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.3.1/lib/action_controller/res
cue.rb:20:in `process_with_exception''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/ruby/lib/ruby/gems/1.8/gems/rails-0.9.4.1/lib/dispatcher.rb:42:in
`dispatch''\r
[Fri Jan 28 20:19:35 2005] [error] [client 192.168.0.15] \tfrom
D:/dev/blog/public/dispatch.cgi:10\r
As you might guess, I am running under windows (2000).
I have created a tmp directory in c:/winnt - clearly the wrong place.
Where should it go?
The apache config for the virtual machine is where I suspect the problem
might be. It contains (removing comments).
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "D:/Program Files/Apache Group/Apache2/htdocs"
ServerName mars
# Other directives here
</VirtualHost>
<VirtualHost 192.168.0.15:80>
ServerName rails
DocumentRoot D:/dev/blog/public/
ErrorLog D:/dev/blog/log/apache.log
<Directory D:/dev/blog/public/ >
Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny
</Directory>
</VirtualHost>
Thanks for your help.
Ian
--
If you practise error, you do error. If you practice perfectly, you will become
perfect.
You can''t correct the fast. You can speed up the correct.
MM