Tips for Running Rails in Web Root on Bluehost



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.



2 Responses to “Tips for Running Rails in Web Root on Bluehost”

  1. G. Miller says:

    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