Home > Uncategorized > Hostmonster rails setup

Hostmonster rails setup

I finally got rails setup on my hostmonster server. They have some information about the setup in their knowledge base but that is a little outdated.  It needs to be tweaked a little bit to get it working. There are quite a few articles out there explaining how to get rails up and running but most of them are outdated. After some looking around and making 3 calls to the tech support, I got it to work. This is what you need to do to setup rails.

1.  Create a rails app whereveer you want in your home directory.

$ cd railsapp

$rails myapp

2. Create a symlink to the public directory from your www directory.

$ ln -s ~/www/myapp myapp/public

3. Create a subdomain pointing to ~/www/myapp. This will be url for your rails application.

4. This is how much the knowledge base goes upto. Note that you don’t have to do script/server start to start the server. They have already configured apache to run your application. All you have to do now is create a .htaccess file in the ~/www/myapp directory.  My file is here (rename the file to .htaccess) if you are interested.

5. Then go to the url of the subdomain you just created and voila! you have a rails app running ( I assume that you have created the database and have done all the usual stuff of settting up).

Note: Lot of people on the web had to change the permission to the directories and stuff. I didn’t do any of those.

Hope this helps someone someday! Let me kow if you have trouble setting up.

Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.

Anti-Spam Protection by WP-SpamFree