ROR/Ruby tech swap

I recently developed a detailed set of notes to create a Linux box from scratch and the install + configure Ruby, ROR, MySQL, CVS (with SSH), Apache w/ fastcgi so that it serves up a simple rails app.

To give something back to the group, I could clean it up and share if it'd be useful.

There's weaknesses: virtual host configuration in Apache. I confess I don't know what I'm doing. I wanted to configure Apache so that I could develop several ROR apps for several clients using virtual hosts but no dice. Perhaps people could submit tips and I can include those.

There's four areas I haven't gotten around to working on. If you can submit some tips I'd be happy to round out my doc with them:

1. SSL connections from browser to Apache. To make a ROR app work wth SSL I think it's just a matter of configuring Apache. Yes/No? I don't know. 2. SSL connection from ROR to MySQL. There's documentation on this. I've never gotten a CA certificate and actually did it. 3. Virtual Hosting as I say above. 4. I got Apache to serve ROR apps by soft linking from /var/www/html to the public directory of the ROR app which was developed in my homedir. Well, they requires having one's home dir wide open which is a security risk on many fronts. I think some instructions ought to be included on adding a task which does a sudo and installs the app properly.

There's bound to be improvements w.r.t. security.

My idea would be to provide a single source instruction set to go from nothing to a fully working ROR development and web serving Linux box which even allows remote CVS logins and submissions. That'd allow a motivated techinical person to explore ROR without having to get 9 Phds on his/her first day.

My document is in LaTeX and I could provide .tex, .dvi, .ps, .pdf and even html versions of it. It's version controlled to.

A second round could include all the same but for Microsoft IIS + Sqlserver.

Shane

That'd be nice to have.. maybe add subversion

You might want to take a look at http://rubyforge.org/projects/instantrails/ which is currently for Windows but which I believe will be supporting Linux as well in the 2.0 release.

Sincerely, Anthony Eden

Anthony,

Thank you for this link. I was not aware this animal existed. In fact, I was going to have to get around to ROR+Windows shortly, and this link (provided it installs currentish versions of everything) just made that headache way smaller.

Thank you, Shane

Cayce Balara wrote:

I have been working my way towards not-as-detailed notes for similar, starting with Fedora 4 and doing Subversion and Mongrel (instead of CVS and FastCGI). I've just been keeping notes of steps and the exact commands, I haven't fleshed it out fully with comments/notes on each step, and I don't have anything on the FC4 installation/configuration (out of scope). Would be happy to share, when I'm done, or we can compare notes before posting.

c.

We ought to combine notes. I too considered subversion but stayed with CVS. I don't know anything about Mongrel. In fact you've bitten off a work that I decided to avoid which was using Fedora 4. I wanted to focus on ROR so I purchased RHEL4.0 from Redhat to avoid (potentially) independency hell between all the systems.

I suggest we troll for hints on solving the outstanding problems I list above and them combine the notes. If people are risk adverse like me, they can step into RH4.0 commercially for $129 and up. Otherwise they can get RH fedora going your way.

Shane

Shane,

If you like the stability of RHEL but can't afford it go with CentOS. It is based off the same source + updates of REL but it is Free/free. I've been using it for about what, 2 years now? Never been happier. You can add other yum repositories like DAG/Wiers and you can get everything. Now, on the deployment side I have been using Litespeed for a few months now and I must say that I'm really happy with it. LSAPI rocks!

AEM

I’ve found it much easier to use Fedora Core 5 than RHEL (which was tried initially). In theory purchasing a commercial Linux distro would better maintained and easier to work with, but that’s not been my experience. Community driven distros move faster, and Rails is cutting edge stuff that relies on latest and greatest versions of Ruby, Apache, Mongrel, etc. Fedora has the newer packages that Rails depends on. For example, Apache 2.2 is included in Fedora 5. You need Apache 2.2+ if you want to use mongrel_cluster and mod_proxy_balancer.

I used to be big on Apache but with time I've found it to be a hog on resources and you have to really know what you are doing to strip it down without hurting yourself. I'm currently still using it on some servers just because it would be time consuming to port but all my new deployments just use Litespeed. I must say that I have (and still maintain some):

* Apache Proxy + Lighttpd + FCGI * Apache Proxy + Lighttpd + Mongrel * Lighttpd + Mongrel * Pound + Mongrel * LiteSpeed

I can honestly say I have tried many different approaches and LiteSpeed really fits me the best. Not only it is easier to manage (don't need to check so many mongrel processes), it performs really well and is very light and conscientious on memory usage (opens/closes processes as necessary). Besides, the fewer moving parts the easier it is to keep the whole thing running. The only downside could be if you need to use sendfile a lot you probably need to pay for the Enterprise version. I haven't had the need and whenever I had a problem the support has been great even though I'm not a paid subscriber.

I'm not trying to be a LS evangelist but it has really made my life easier.

AEM

On the Centos/RHEL and new packages issue, you can get Apache 2.2+ on the Plus or Extras repos easily and I always prefer to compile myself Ruby from sources. I've had some problems when using RPMs for Ruby but sources have never failed me so far.

Just my 0.02 cents,

AEM