SOS. How can I use dispatch.cgi from command line?

Hi,

Arrgg. I'm getting nasty Premature end of script headers: dispatch.cgi,
referer: http://www.myapp.com

If I go to http://www.myapp.com I can get to the main page perfectly.
But when I try to get to the login page http://www.myapp.com/login then
I get the errors (this has been working fine before..)

Running dispatch.cgi from command line should give more info I think.

How do I use dispatch.cgi from command line so it goes to the
http://www.myapp.com/login to find some errors?

SOS

I modified the routes to get to the login page. I got:

myspapp.com [~/rails/theapp/public]# ./dispatch.cgi
/home/mine/rails/theapp/app/views/session/new.html.erb:1: warning: don't
put space before argument parentheses
Segmentation fault

I modified the routes to get to the login page. I got:

myspapp.com [~/rails/theapp/public]# ./dispatch.cgi
/home/mine/rails/theapp/app/views/session/new.html.erb:1: warning: don't
put space before argument parentheses
Segmentation fault

--------

Hmm. Segmentation fault. Whatever that means.

That means the ruby interpreter is borked and crashed. The currently
available version of ruby 1.8.6 (patch level 230) is known to do
that . If you want to run dispatch.cgi by hand then you'll have to set
up all the stuff that the webserver would ie all the environment
variables and so on).

Fred

Thanks Fred, you are always around \O/

The currently available version of ruby 1.8.6 (patch level 230) is known to >> do that

And that patch level is exactly the same that Bluehost is having
currently 8-P
In my case the forms are the problem. If I remove the form then that
page at least works. This I use:

<% form_tag session_path do -%>
  <label for="login">Username</label><%= text_field_tag 'login' %>
  <label for="password">Password</label><%= password_field_tag
'password' %>
  <%= submit_tag "log in" %>
  <%= link_to 'Sign up', signup_url %>
  <br><br>
<% end -%>
<br/>
<%= link_to 'Forgot password?', forgot_password_url %>

I'm not sure is there a workaround...

Cheers.

Btw. We can freeze the Rails gems but that is not including Ruby I
guess.
Is there a way to prevent these problems when someone goes and upgrades
Ruby?

Cheers.

Not that I know off. Your host should know better than to upgrade to a
known bad version of ruby.

Fred

Not that I know off. Your host should know better than to upgrade to a
known bad version of ruby.

Just heard it might take one week :frowning:

Thanks Fred.