Browsing the web it seems to be quite a challenge installing and working with Ruby On Rails on HostMonster.
We felt the same, once we figured out the tricks, we have really started appreciating deploying on this.
Here are a tips for deploying RoR apps:
Creating an RoR App in Host Monster
1) Create an app in Ruby on Rails console in cPanel and PATH pointing to the my_rails_app rails app root directory (under which u would have public, config, etc..)
2) Create a subdomain (if required) using cpanel, give it your app name myapp (HOME/public_html/myapp)
3) Build your app OR extract your app in the my_rails_app dir
4) Go to the MySql Databases in cPanel, create the Database you want to use and the user name, associate the DB with the user.
5) Go to my_rails_app/config/database.yml and make the necessary changes
adapter: mysql
database: myid_dbname
username: myid_username
password: mypassword
hostname: localhost
5) Go to my_rails_app/config/environment.rb and add the line
ENV['GEM_PATH'] = ‘/my/home/dir/ruby/gems:/usr/lib/ruby/gems/1.8′
6) rm ~/public_html/myapp
ln -s my_rails_app_dir myapp
7) Check if you have dispatch.cgi; dispatch.fcgi; dispatch.rb if not copy from any of your RoR apps
8 ) make sure your .htaccess is fine, better still copy this..
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
</IfModule>
<IfModule mod_cgi.c>
AddHandler cgi-script .cgi
</IfModule>
Options +FollowSymLinks +ExecCGI
# If you don’t want Rails to look in certain directories,
# use the following rewrite rules so that Apache won’t rewrite certain requests
#
# Example:
# RewriteCond %{REQUEST_URI} ^/notrails.*
# RewriteRule .* - [L]
# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On
# If your Rails application is accessed via an Alias directive,
# then you MUST also set the RewriteBase in this htaccess file.
#
# Example:
# Alias /myrailsapp /path/to/myrailsapp/public
# RewriteBase /myrailsapp
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
<IfModule mod_fastcgi.c>
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
</IfModule>
<IfModule mod_fcgid.c>
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
</IfModule>
# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
#
# Example:
# ErrorDocument 500 /500.html
ErrorDocument 500 “<h2>Application error</h2>Rails application failed to start properly”
9) go to the browser and hit
http://myapp.mydomain.com
You should feel happy now