I follow this guide, https://www.digitalocean.com/community/tutorials/how-to-setup-a-rails-4-app-with-apache-and-passenger-on-centos-6
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.
Make sure your DocumentRoot is set to the public folder, not the app’s root: <pre> DocumentRoot /var/www/html/helloapp/public </pre> Also, make sure you use the real output of the <code>passenger-install-apache2-module</code> 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: <pre> LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so <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 </IfModule> </pre>