deployment for dummies

Wow, I started writing this and it does rely on a certain amount of linux and
apache configuration. I've been impressed with RimuHosting's ability and
willingness to help but it sounds like you need a shared host more than a
VPS if you're just trying to get your feet wet with a single mongrel.

If you wanna keep going, people who help you will need to know what linux
distro you selected and whether you asked for a rails stack to be installed.

Taylor Strait-2 wrote:

ssh is the first essential tool you will need. The syntax is:

ssh -p <port-num> user@host.tld

You can normally omit the -p argument. Since you are on Windows, consider
OpenSSH:

http://sshwindows.sourceforge.net/

Once you are on the server, you can set up your directories. One typical
directory tree places all Web stuff in /var/www, so:

cd /var/www
mkdir rails
cd rails
mkdir myfirstapp

Ok, you are good to go. Ctrl+D to exit.

Next, on your Windows box:

c:\some\place\you\develop: gem install capistrano
c:\some\place\you\develop: cap --apply-to myfirstapp

Now read this:

http://wiki.rubyonrails.org/rails/pages/Capistrano

If you are not using Subversion, you will have a much harder, uphill climb.

Finally, back on the linux box, edit (emacs or vim)
/etc/httpd/conf/httpd.conf and stick this at the end:

<VirtualHost *:80>
   ServerName www.myfirstapp.com
   ServerAlias myfirstapp.com
   DocumentRoot /var/www/rails/myfirstapp/current/public
   ProxyRequests off
   ProxyPass / http://localhost:10020/
   ProxyPassReverse / http://localhost:10020
   ProxyPreserveHost on
</VirtualHost>

Save it.

Now type:

apachectl -t

This will syntax check your apache configuration file. Assuming that's ok:

apachectl graceful

Now all that's left is to go to the directory where you put your rails app:

cd /var/www/rails/myfirstapp/current
mongrel_rails start -p 10020 -e production -d

I probably forgot a few things, but this is a scratchpad version of how I
typically set things up. You'll want to tweak your initialization sequence
so the mongrel restarts at reboot, but that's a subject for another day.

As I said, you chose a complex topic.

Taylor Strait-2 wrote: