Problem running Ruby / Rails Passenger-Apache-CentOS

Posted June 13, 2014 3.3k views
I follow this guide, Everything sees OK but Ruby Code does not see to be interpreted or rendered. If I go to the IP I get the default Apache "Apache 2 Test Page powered by CentOS" page. No rails. If I type in the direct path to a page with Ruby code in it, the page just renders as HTML. I have checked that all the paths are correct and have added the passenger code to the bottom of the httpd.conf. I don't know what I am doing wrong.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer
Make sure your DocumentRoot is set to the public folder, not the app's root:
DocumentRoot /var/www/html/helloapp/public 
Also, make sure you use the real output of the passenger-install-apache2-module command, not what is in the article. It will be different depending on the most recent version of passenger when you run it. For instance, right now it is:
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45/buildout/apache2/
<IfModule mod_passenger.c>
     PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45
     PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.0.0-p481/wrappers/ruby