Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

Tips for Running Rails in Web Root on Bluehost

Sep 09

This took me way too long to figure out, but I finally got it.  It’s not the most desirable solution and I’m currently looking into alternate approaches.  Bluehost has a great howto for running Rails with a subdomain ie (app.domain.com), but I wasn’t able to find anything about running Rails in the web root.  With Bluehost your document root actually lives in the public_html folder.  Now the trick is to remove or rename public_html and then create a symbolic link:

ln -s /home/domain/railsapp/public public_html

This should do the trick and all incoming requests will be routed to the necessary controllers.  I was fairly excited to get this working since I’ve spent a tremendous amount of time trying to get Rails running in my web root.

3 comments

  1. G. Miller /

    Hi Dennis,

    First off, great job all around. You’re documentation has been an enormous help! I’m really struggling with GoDaddy and your site is about the only place I’ve gotten correct answers. I was hoping you could contact me so I could ask you a few questions that extend well beyond the scope of posting here. In an attempt to give this post some semblance of on-topic-ness: what are your thoughts on Bluehost? I’m finding myself quite unhappy with my current hosting.

    Thanks.

  2. No problem at all. Please feel free to contact me with any questions at dennisbaldwin at gmail.

Leave a Reply