Just Host Web Hosting Help
Ruby on Rails application generates a 500 - Premature end of script error
Problem:
When I attempt to execute my Ruby on Rails application I receive "500- Premature end of script."
Solution:
This error generally has two potential causes:
- The file permissions are not set to allow the dispatch.cgi to execute properly.
Chmod the dispatch.cgi to 0755.
- The path to Ruby is is incorrect in the dispatch.cgi file.
The first line of the file is called the hashbang-- it sets the location of the interpreter (in this case ruby).
Change the hashbang to the correct path to Ruby (/usr/bin/ruby).
The first line of the dispatch.cgi file should look like this:
#!/usr/bin/ruby
108,718 views
bookmark
share
tags: premature rails ruby script
E-mail
Twitter
Google Bookmarks
Facebook
MySpace
Digg
Reddit
Delicious
LinkedIn
StumbleUpon