Ruby code being rendered as html

  • Posted June 12, 2014

i followed the guide to load rails on centos to work with passenger. when i go to the ip / site it seem ruby is not being served. All ruby code is rendered as html. Any ideas. This was the case on a ubuntu droplet as well.


Submit an 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.


I did use the CentOS guide from the link you provided. Now Apache is not even running. Check all the paths to ruby and added the passenger code to the bottom of the Apache config file, but still no luck.

I did all of this as root. Is that OK? I did notice that when I tried to do a bundle install it says not to do it as a root user. So I added a new user and made it a sudoer. When i try to do a rails new or any command I get a lot of errors!

Sorry I have a windows server now, all this Linux is new to me.

If you could provide some more info, we’d be able to help you better. Which guide did you follow? What web server are you using? Apache? Nginx? Could you pastebin your configuration files?

If you’re using Apache on CentOS, check out this tutorial: