Rails, Passenger, and Apache
I set up a rails app in a dir, and set up apache's virtual host to point to the public dir, as mentioned in the linode documentation for rails. The webapp worked; I saw the rails splash page (Welcome Aboard) when I navigated to my website in a browser. But I wanted to start creating the rails app.
First, I installed the Passenger gem and ran 'passenger-install-apache2-module'. After following all the directions, I then ran 'rails generate controller home index'. Then I proceeded to delete index.html in my public folder of the rails app, modify routes.rb in the config dir to say root :to => "home#index". But now I get a 500 Internal Server Error going to my website, and I don't understand why. The error logs just say, "Premature end of script headers:" every time I go to the site. If I put index.html back into the public dir of my rails app, i see that again on the browser, but it appears rails isn't handing the routing.
Anyone know how to fix this??
2 Replies
I have tested these guides multiple times, and both works flawlessly for me. Hope this helps one way or the other.
Ke
I believe I had to add those to get it to work.