# Deployment for dummies

**URL:** <https://www.ruby-forum.com/t/deployment-for-dummies/90676>\
**Category:** Rails\
**Created:** [March 30, 2007, 10:22pm UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676 "2007-03-30T22:22:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [March 30, 2007, 10:22pm UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676/1 "2007-03-30T22:22:07Z")

</div>

Any tutorials for windows users on how to deploy on a VPS like  
rimuhosting? All the tutorials I’ve read assume Apache and Linux  
knowledge. There was no answer on the rimuhosting forums. I just want  
to get Mongrel up and running and make it accessible from my domain  
name. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [March 30, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676/2 "2007-03-30T22:39:55Z")

</div>

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 S.-2 wrote:

> >

–  
View this message in context:  
[http://www.nabble.com/deployment-for-dummies-tf3494404.html#a9760462](http://www.nabble.com/deployment-for-dummies-tf3494404.html#a9760462)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [March 30, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676/3 "2007-03-30T23:21:41Z")

</div>

1. I used the default Linux distribution, though I cannot find details
2. The rails stack was installed.

A book or website link would be fine! I know what PuTTy, SSH, etc. is  
but haven’t really used it much. How does one learn this usually from  
outside Linux-world?

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [March 30, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676/4 "2007-03-30T23:36:03Z")

</div>

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

ssh -p removed\_email\_address@domain.invalid

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

[http://sshwindows.sourceforge.net/](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](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](http://www.myfirstapp.com)  
ServerAlias [myfirstapp.com](http://myfirstapp.com)  
DocumentRoot /var/www/rails/myfirstapp/current/public  
ProxyRequests off  
ProxyPass / [http://localhost:10020/](http://localhost:10020/)  
ProxyPassReverse / [http://localhost:10020](http://localhost:10020)  
ProxyPreserveHost on

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 S.-2 wrote:

> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
View this message in context:  
[http://www.nabble.com/deployment-for-dummies-tf3494404.html#a9761319](http://www.nabble.com/deployment-for-dummies-tf3494404.html#a9761319)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [April 3, 2007, 2:17am UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676/5 "2007-04-03T02:17:02Z")

</div>

Thanks for all of your help! I’m starting to get the hang of things,  
after botching a MySQL 5.0 upgrade and getting tech support  
intervention. (^\_^) After a lot of wrangling I have it up and running  
on an IP address. I can’t seem to get it to forward from the domain  
name, though. Here is what I did:

1. set the nameservers to that of my host
2. added “A” Zone → “[buwatercooler.org](http://buwatercooler.org) points to 72.249.22.50” (not  
necessary)
3. edited apache’s httpd.conf to:

\<VirtualHost \*:80\>  
ServerName [www.buwatercooler.org](http://www.buwatercooler.org)  
ServerAlias [buwatercooler.org](http://buwatercooler.org)  
DocumentRoot /var/www/rails/watercooler  
ProxyRequests off  
ProxyPass / [http://localhost:3000/](http://localhost:3000/)  
ProxyPassReverse / [http://localhost:3000](http://localhost:3000)  
ProxyPreserveHost on

1. set up mongrel:

mongrel\_rails start -p 3000 production -d

Still won’t resolve at “[www.buwatercooler.org](http://www.buwatercooler.org)” but “72.249.22.50:3000”  
will. What have I missed? Thanks!

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [March 30, 2007, 11:57pm UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676/6 "2007-03-30T23:57:04Z")

</div>

if you want something that’s a little more turnkey you might wanna try  
any of the following in no particular order:

- the deprec gem that’ll setup an ubuntu box for you for rails - you  
can use this on hosts like rimu and slicehost
- [railsmachine.com](http://railsmachine.com) - you manage your own VPS but they start you off  
with a working config
- [engineyard.com](http://engineyard.com) - they manage your app for you own a VPS and is  
definitely the ferrari of the rails hosting world

Hope that helps.

-Michael  
[http://javathehutt.blogspot.com](http://javathehutt.blogspot.com)

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [April 3, 2007, 3:22am UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676/7 "2007-04-03T03:22:37Z")

</div>

Taylor S. wrote:

> This issue has been resolved but I can now only access my site through  
> “[buwatercooler.org](http://buwatercooler.org)” and not “[www.buwatercooler.org](http://www.buwatercooler.org)” - this may confuse  
> visitors. How can I add www. as a valid path?

Resolved. Thanks for all the help!

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [April 3, 2007, 3:15am UTC](https://www.ruby-forum.com/t/deployment-for-dummies/90676/8 "2007-04-03T03:15:48Z")

</div>

This issue has been resolved but I can now only access my site through  
“[buwatercooler.org](http://buwatercooler.org)” and not “[www.buwatercooler.org](http://www.buwatercooler.org)” - this may confuse  
visitors. How can I add www. as a valid path?
