My setup: Ubuntu 12.04 LTS, Apache, Phusion Passenger, latest Ruby and Rails.
When I visit my website, I get a 500 Internal Server Error. Error Logfiles: Premature end of script headers
Does somebody know how to solve that problem?
Just posting here in case other people have the same problem as I did.
I followed the Rails tutorial and part of that tutorial was making sure the secret_token
was generated dynamically (listing 3.2 in the link) as a .secret
file in the application root.
The problem was that the application somehow didn't write a token to the file, so I took the value from my development .secret
, modified it, and saved it on the server. That made my application work in production.
If you have a database configured for production
in your config/database.yml
that doesn't exist on the server as you mentioned in the comments, that could be the source of your issue since it's failing to establish a database connection.
Remove that connection from your config/database.yml
and restart your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With