Web-Server for RubyOnRails in Development period

Hello!

What web-server(s) is best for development (not for production) via
rubyonrails?
I try use Apache + FastCGI, but I must restart Apache to see changes
in required ruby-scripts (rb-files).

P.S. I want have maximum perfomance.

Most people use mongrel (and a lot of people use that in production too).
ruby script/server will run mongrel if it's installed.

Fred

I'm currently using Mongel for development, but I've been interested
in trying out Thin for development instead.

Apache + FastCGI is fast becoming obsoleted by the likes of Phusion
Passenger (a.k.a. mod_rails). While that's good for shared hosting,
many still prefer a more versatile solution such as Apache, or nginx
for serving some static content with the Rails application served by
Mongrel or Thin clusters.

There are several options for development and even more for
deployment. Take a look at each and decide what fits your case the
best. So far Mongrel has been perfectly fine for my own development.

Only mogrel? Or, for example, nginx + mogrel?

> P.S. I want have maximum perfomance.

Apache + FastCGI is not the right choice for this requirement. :slight_smile:

Thin may be what you want. See more details here: http://code.macournoyer.com/thin/

What can you say about nginx+mogrel?

Only mogrel? Or, for example, nginx + mogrel?

I wouldn't usually bother with a cluster of mongrels in development.

Fred

@veejar: It sounds like you may not be full understanding that Mongel
and Thin are web servers. It's entirely possible to use Mongrel or
Thin in deployment as well as development. There are reasons, however,
to use another web server in deployment. One primary reason is that
Apache has been beat on extensively by hackers. Most vulnerabilities
have been found and corrected over the years. I'm not saying the
Mongrel or Thin is necessarily insecure, but they are likely not has
harden against attacks as something like Apache.

So what most people do is run Apache or nginx on the public facing
side and use Mongrel or Thin behind their firewall. Then some form of
load balancer is used to direct requests from Apache to the Mongrel or
Thin cluster. One option for Apache is mod_proxy_balancer. Not saying
that it is the very best solution. I've heard about other options that
do a better job of balancing the load.

@Frederick: I was referring to deployment when I mentioned clusters.
Obviously there would be little benefit to a cluster for development.
Unless maybe you're doing load testing, but that would sort of suggest
a staging environment where the cluster would be running.

You've already seen various opinions already. If you are using JRuby,
then GlassFish Gem is another option. Read more about it at:

http://blogs.sun.com/arungupta/entry/jruby_1_1_3_released

And you can use the same for deployment as well, it's still evolving.

-Arun

What do you mean by “development”?

development is usually done on the developer’s machine, running a single mongrel started by ruby script/server. Doing anything else is a waste of time and resources in my opinion.

Staging, or showing clients previews and letting them play, should be done on a setup that’s just like production. Whatever you use in production is what you use for staging.

nginx + mongrel is for production and is a good approach. so is Passenger (mod_rails).