# Deployment options for RoR class

**URL:** <https://www.ruby-forum.com/t/deployment-options-for-ror-class/86910>\
**Category:** Rails\
**Created:** [February 26, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/deployment-options-for-ror-class/86910 "2007-02-26T21:18:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![suer\_rick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Post date:** [February 26, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/deployment-options-for-ror-class/86910/1 "2007-02-26T21:18:58Z")

</div>

I’m setting up a linux server to host RoR apps written by students for  
their project. The students will (obviously) not have root access to  
the server. The students all have windows systems for development.

There are two issues:

1. should I have them use mongrel or mongrel\_cluster?
2. should I have them use capistrano, or should they just copy their  
stuff up to the server?

For #1, my impression is that mongrel\_cluster really wants to be run as  
root. My plan is for the students to each run mongrel\_rails on an  
assigned port. Apache will be configured to proxy to that port. If the  
machine is rebooted, the students will have to restart mongrel. Not  
ideal, but I think this is reasonable, unless anyone has a better idea.  
If they really need more than one mongrel, I can always assign 2 or 3  
ports to each student, and they can manually start mongrel on each of  
them.

For #2, I need more information to make a decision:  
a) how hard is it to install a subversion client on windows? (I  
personally try to use \*nix as much as possible) I really want to avoid  
having to debug problems on the student’s machines. If this is anything  
other than trivially simple, I’m not sure I want to do this for the  
class.

b) I assume that each student would also need to install the  
capistrano gem on their machine?

c) If I make it past a & b, it seems that capistrano wants to use  
mongrel\_cluster, not just mongrel. Is this right?

So, I’m leaning towards just having them sftp their stuff up to the  
server and restarting mongrel\_rails.

I appreciate any comments.

---

<div class="post-metadata">

**Author:** ![suer\_rick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Post date:** [February 26, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/deployment-options-for-ror-class/86910/2 "2007-02-26T21:23:58Z")

</div>

I’m not sure if you’re restricted in IDE, but Eclipse has a fantastic  
subversion plugin that you could use, and with RadRails and RDT, has  
syntax  
highlight and quite a bit of other goodies for Ruby/Rails development  
work.

Can’t help you out on the mongrel\_cluster and mongrel\_rails, although  
from  
what I understand, mongrel cluster basically reads a config file and  
just  
starts a bunch of mongrels for you… there’s not really that much more  
to  
the cluster version. I would think if your students have access to be  
able  
to start/stop a mongrel, they should be able to also start/stop a  
cluster?  
Dunno, never tested this, just off the top of my head.

---

<div class="post-metadata">

**Author:** ![suer\_rick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Post date:** [February 27, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/deployment-options-for-ror-class/86910/3 "2007-02-27T22:32:40Z")

</div>

On 2/26/07, Rick S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m setting up a linux server to host RoR apps written by students for  
> their project. The students will (obviously) not have root access to  
> the server. The students all have windows systems for development.

> For #1, my impression is that mongrel\_cluster really wants to be run as  
> root. My plan is for the students to each run mongrel\_rails on an  
> assigned port.

FWIW, mongrel (and thus mongrel\_cluster) will run as any user you  
want. You do, of course, have to run on a non-privileged port, as is  
always the case with non-root users.

J.

---

<div class="post-metadata">

**Author:** ![suer\_rick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Post date:** [February 28, 2007, 4:33pm UTC](https://www.ruby-forum.com/t/deployment-options-for-ror-class/86910/4 "2007-02-28T16:33:00Z")

</div>

David W. wrote:

> integration for a specific IDE you can use it with whatever development  
> tools you like."

I also recommend that if you do use TortoiseSVN, do look at the guide  
that comes with TrtoiseSVN - I think it explains how to get around with  
SVN quite well… and makes some things quite obvious. 🙂

Cheers  
Mohit.

---

<div class="post-metadata">

**Author:** ![suer\_rick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Post date:** [February 28, 2007, 10:46am UTC](https://www.ruby-forum.com/t/deployment-options-for-ror-class/86910/5 "2007-02-28T10:46:21Z")

</div>

Rick S. wrote:

> For #2, I need more information to make a decision:  
> a) how hard is it to install a subversion client on windows? (I  
> personally try to use \*nix as much as possible) I really want to avoid  
> having to debug problems on the student’s machines. If this is anything  
> other than trivially simple, I’m not sure I want to do this for the  
> class.

Hi, Rick.

I found installing TortoiseSVN ([http://tortoisesvn.net/](http://tortoisesvn.net/)) onto my XP  
machine very, very simple. It’s also very, very easy to use, for  
checking out a fresh working copy of the repository, updating,  
committing, displaying diffs…

From the website:  
“It is implemented as a Windows shell extension, which makes it  
integrate seamlessly into the Windows explorer. Since it’s not an  
integration for a specific IDE you can use it with whatever development  
tools you like.”

Cheers,

Dave

---

<div class="post-metadata">

**Author:** ![suer\_rick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Post date:** [March 1, 2007, 6:13am UTC](https://www.ruby-forum.com/t/deployment-options-for-ror-class/86910/6 "2007-03-01T06:13:15Z")

</div>

Rick S. schrieb:

> I’m setting up a linux server to host RoR apps written by students for  
> their project. The students will (obviously) not have root access to  
> the server. The students all have windows systems for development.
> 
> There are two issues:
> 
> 1. should I have them use mongrel or mongrel\_cluster?

I would use mongrel, no cluster, the clustering is for adding  
performance (scaling) for dev purposes I never use more than one mongrel

> 1. should I have them use capistrano, or should they just copy their  
> stuff up to the server?

Capistrano is a great tool, but you’ll need to spend a day for everyone  
to setup their deploy.rb recipes. Likely they’ll all be identical with  
some config lines differ per user.

The best part, IMHO, of Capistrano is that it lets you release your web  
app in versions.

> For #1, my impression is that mongrel\_cluster really wants to be run as  
> root.

nonsense, I run mongrel and cluster as non-root as a rule

My plan is for the students to each run mongrel\_rails on an

> assigned port. Apache will be configured to proxy to that port.

That could be tedious, I would just have them run the mongrels with  
their local user accounts. Of course, you’ll need to assign ports.

If the

> machine is rebooted, the students will have to restart mongrel.

yes, unless you do some configing to have mongrel(s) start on boot

Not

> ideal, but I think this is reasonable, unless anyone has a better idea.  
> If they really need more than one mongrel, I can always assign 2 or 3  
> ports to each student, and they can manually start mongrel on each of them.
> 
> For #2, I need more information to make a decision:  
> a) how hard is it to install a subversion client on windows? (I  
> personally try to use \*nix as much as possible) I really want to avoid  
> having to debug problems on the student’s machines. If this is anything  
> other than trivially simple, I’m not sure I want to do this for the class.

don’t use svn

> b) I assume that each student would also need to install the  
> capistrano gem on their machine?

yes, capistrano must be installed on the dev machine, not on target

> c) If I make it past a & b, it seems that capistrano wants to use  
> mongrel\_cluster, not just mongrel. Is this right?

no, you write your own deploy.rb recipe, thus you write your own server  
restart method

> So, I’m leaning towards just having them sftp their stuff up to the  
> server and restarting mongrel\_rails.

ftp might be simpler,

or what we do is use Samba to share the local dirs to the users, then  
people develop on their windows machines but the files they work on are  
on the linux dev box. Thus only 1 install of Rails/MySQL etc, they run  
their own mongrels via shell connections. We also use Easy-Eclipse.

> I appreciate any comments.
> 
> >

good luck

andy koch
