So I think I have discovered how to have more than one Rails application running and figured I would share.
First, if you're having problems running any Ruby commands from SSH, add this line to your .bash_profile in your home directory:
export PATH=$PATH:/usr/local/ruby/bin
Supposedly, when you login through ssh that file should be sourced. For some reason, it is not being sourced for me, so when I log in I type:
source .bash_profile
and then you can run ruby, rails, or rake from any directory.
Now, I was doing the Rolling with Ruby on Rails tutorial (http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html) so I found the directory that Westhost installed rails to and tried to add a rails cookbook application there.
Rails is installed under /var/www so I changed to that directory and ran
rails cookbook
This will create a cookbook directory in /var/www with all of the subdirectories and starting files it needs. However, if you point your browser to yourdomain.com/cookbook/ (notice that the trailing slash is important also) you will get a 404 /trails/ was not found on this server.
So now you want to edit your httpd.conf file which is found in /etc/httpd/conf/. Search that file until you find the original rails setup that Westhost used which should look like this...
Alias /rails/ "/var/www/rails/public/"
<Directory "/var/www/rails/public">
Options ExecCGI FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
Now, all I did was copy and paste that directly underneath and change rails to cookbook.
You will need to check that you didn't make any syntax mistakes by running
apachectl configtest
and if that says Syntax OK, then run
apachectl graceful
Now, you are almost there. Go to the /var/www/cookbook/public and edit the .htaccess file. Under the line that reads RewriteEngine On add this line
RewriteBase /cookbook
You may also want to look for the rewrite rule that includes dispatch.cgi and change it to dispatch.fcgi. Now if you refresh your browser, you should get the Rails welcome aboard page.