Question

Ruby code being rendered as html

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

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

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:

https://www.digitalocean.com/community/tutorials/how-to-setup-a-rails-4-app-with-apache-and-passenger-on-centos-6