# Best ruby web framework?

**URL:** <https://www.ruby-forum.com/t/best-ruby-web-framework/195009>\
**Category:** Ruby\
**Created:** [September 15, 2010, 9:42am UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009 "2010-09-15T09:42:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 9:42am UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/1 "2010-09-15T09:42:57Z")

</div>

As my subject line says the question is about ruby web framework

Which is the best ruby web framework?  
Is it good in performance and speed to use ruby without any framework  
(running on Apache) ?

---

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 11:06am UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/2 "2010-09-15T11:06:05Z")

</div>

2010/9/15 Mohammed R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> As my subject line says the question is about ruby web framework
> 
> Which is the best ruby web framework?

The most popular is Rails certainly.  
But I use Sinatra (a light framework) for the project.

> Is it good in performance and speed to use ruby without any framework  
> (running on Apache) ?

Do you mean running ruby with CGI?  
For performance CGI is not that good.

Regards.

---

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 11:13am UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/3 "2010-09-15T11:13:41Z")

</div>

On Wed, Sep 15, 2010 at 2:32 PM, Young W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 2010/9/15 Mohammed R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > As my subject line says the question is about ruby web framework
> > 
> > Which is the best ruby web framework?
> 
> The most popular is Rails certainly.  
> But I use Sinatra (a light framework) for the project.

which is the best in terms of performance and speed

> > Is it good in performance and speed to use ruby without any framework  
> > (running on Apache) ?
> 
> Do you mean running ruby with CGI?  
> For performance CGI is not that good.

running Ruby script using apache like php.  
putting the source in /var/www  
and calling like [http://localhost/test.rb](http://localhost/test.rb)

---

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 1:06pm UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/4 "2010-09-15T13:06:39Z")

</div>

I think your best bet us to go with rails 3 and ruby 1.9.2.

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 3:31pm UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/5 "2010-09-15T15:31:43Z")

</div>

Mohammed R. wrote:

> running Ruby script using apache like php.  
> putting the source in /var/www  
> and calling like [http://localhost/test.rb](http://localhost/test.rb)

mod\_ruby does exist but please don’t use it - very few people use it and  
it hasn’t been developed in about 2 years.

Either use Phusion Passenger, or use a Ruby webserver like mongrel, thin  
or unicorn (which if you want to combine with Apache, you’d simply proxy  
to it using mod\_proxy)

---

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 3:14pm UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/6 "2010-09-15T15:14:54Z")

</div>

Mohammed R. wrote:

> As my subject line says the question is about ruby web framework
> 
> Which is the best ruby web framework?

The “best” framework depends on what your requirements are. If there  
were one “best”, the others would already have died 🙂

> Is it good in performance and speed to use ruby without any framework  
> (running on Apache) ?

Yes.

Your best option is to use Apache with Phusion Passenger (mod\_rails).  
This lets you write applications using the Rack API directly.

Using the raw Rack API, you just implement one method (‘call’) which is  
invoked for each incoming request, and you return an array containing  
the status, headers and body. See:

[http://www.modrails.com/documentation/Users%20guide.html#\_tutorial\_example\_writing\_and\_deploying\_a\_hello\_world\_rack\_application](http://www.modrails.com/documentation/Users%20guide.html#_tutorial_example_writing_and_deploying_a_hello_world_rack_application)

This is a good solution; mod\_rails manages your processes, and can spawn  
extra instances for load-sharing.

Your other main option is fastcgi, but this is falling out of use.

Note that “performance and speed” is rarely the number one goal of  
application development - usually it’s something like time to market,  
which gives you a real business benefit. That’s the main reason for  
using a framework like Sinatra or Rails.

But both of these sit on top of Rack, so you can combine them with raw  
Rack code for the one or two actions which demand the fastest possible  
response rate.

So I’d suggest: write your application first, using whichever tool lets  
you develop it quickest, and _then_ profile it and optimise where  
required.

B.

---

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 3:57pm UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/7 "2010-09-15T15:57:02Z")

</div>

On Wed, Sep 15, 2010 at 1:12 PM, Mohammed R.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> As my subject line says the question is about ruby web framework
> 
> Which is the best ruby web framework?  
> Is it good in performance and speed to use ruby without any framework  
> (running on Apache) ?

If you’re specifically interested in apache integration, someone  
posted [http://www.linterra.org/rsp/](http://www.linterra.org/rsp/) recently. Not used it but it looks  
interesting.

martin

---

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 3:42pm UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/8 "2010-09-15T15:42:59Z")

</div>

> running Ruby script using apache like php.  
> putting the source in /var/www  
> and calling likehttp://localhost/test.rb

and if you become popular, you will need to cache as much generated  
HTML as possible, and serve as many files directly from the hard drive  
as possible, so you will need all the caching, routing, and  
redirecting systems that are built into real LAMP stacks, such as RoR

RoR also features an industry-leading community, documentation, free  
and paid support, and thousands of plugins…

---

<div class="post-metadata">

**Author:** ![mrashi12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@mrashi12](https://www.ruby-forum.com/u/mrashi12)\
**Post date:** [September 15, 2010, 4:10pm UTC](https://www.ruby-forum.com/t/best-ruby-web-framework/195009/9 "2010-09-15T16:10:30Z")

</div>

If you like Apache (and Debian/Ubuntu), you might like rsp. I have spent  
years with Apache and love it. RSP is kind of a glorified Apache module  
for  
Ruby with a small framework on top. It’s pretty simple. But that’s what  
I  
like. You can use it in the context of a raw CGI (though it will run  
more  
efficiently than CGI), embedded Ruby (like PHP), and within a simple MVC  
context. The downside is that I have developed exclusively for  
Debian/Ubuntu, which is what I use every day, so it’s geared for that  
environment. It will compile/run on other distros and BSD. But I’ve not  
had  
the time to package it for them. And it’s written for Ruby 1.9.x.  
Everything’s in the documentation. I’ve worked really hard on keeping it  
up  
to date.
