# Rails + fastcgi... not working :/

**URL:** <https://www.ruby-forum.com/t/rails-fastcgi-not-working/186885>\
**Category:** Deployment\
**Created:** [April 13, 2010, 8:30pm UTC](https://www.ruby-forum.com/t/rails-fastcgi-not-working/186885 "2010-04-13T20:30:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastien-p](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@sebastien-p](https://www.ruby-forum.com/u/sebastien-p)\
**Post date:** [April 13, 2010, 8:30pm UTC](https://www.ruby-forum.com/t/rails-fastcgi-not-working/186885/1 "2010-04-13T20:30:24Z")

</div>

Hello,

I have plesk 9.3 and I am trying to make it go along with rails. So I  
installed ruby, rails, ruby-gems, fastcgi, etc. (I had tried Passenger,  
but it didn’t work with my distro due to dependencies… so I preferred  
giving up).

When I run ./dispatch.fcgi in command-line, it outputs nothing and  
continues executing until I press enter or whatever then it returns to  
shell. When I try to access it on the web, I get an error 500. I looked  
at the logs and I have “Premature end of script headers”. I made some  
searches without success… I’m wondering why it happens. Before having  
this blank output from ./dispatch.fcgi (in command-line), I had a rails  
error telling me that it needed a greater version of ruby-gems so I  
upgraded and now I have nothing… 😕

Is there someone which could help me? This is my very first rails app,  
and my very first deployment… It took me the day to set up everything  
(including capistrano with git, etc), I’m fed up…

(Sorry if I made some English mistakes, I’m not a native-speaker).

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![sebastien-p](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@sebastien-p](https://www.ruby-forum.com/u/sebastien-p)\
**Post date:** [April 14, 2010, 11:13pm UTC](https://www.ruby-forum.com/t/rails-fastcgi-not-working/186885/2 "2010-04-14T23:13:35Z")

</div>

Anyone? 😕

---

<div class="post-metadata">

**Author:** ![sebastien-p](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@sebastien-p](https://www.ruby-forum.com/u/sebastien-p)\
**Post date:** [May 24, 2010, 9:04pm UTC](https://www.ruby-forum.com/t/rails-fastcgi-not-working/186885/3 "2010-05-24T21:04:28Z")

</div>

# Premature end of script headers

for me meant “I had the wrong shebang at the top of my file”

make sure you can run ruby script/server RAILS\_ENV=production and it  
works right.

but really–try passenger. Be nice to yourself. 🙂

-rp
