Report this

What is the reason for this report?

Problem running Ruby / Rails Passenger-Apache-CentOS

Posted on June 13, 2014

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.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.