Problem:

When developing for Ruby on Rails, the development server (the one used by script/server) feels slow and unresponsive.

Cause:

RoR uses WEBrick as the default server. Based on my experience on a Ubuntu virtual machine with 1GB of RAM, this server doesn’t respond as fast as the web application servers in other web languages (Apache, Tomcat, IIS).

Solution:

Install Mongrel. In Ubuntu 9.04, you can install this using:

sudo gem install mongrel

In case you receive build errors, you might have to install ruby-dev to deal with the dependency issues.

sudo apt-get install ruby-dev

Once installed, Rails will automatically use Mongrel as the application server over WEBrick.

UPDATE: Mongrel’s pretty much dead by now. Use thin instead.

Just add gem 'thin' to your Gemfile and run bundle install.

No related posts.

Tagged with:  

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>