14

What web server would you recommend for Ruby on Rails 3 web development on Linux? How about Windows?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Alpha Sisyphus
  • 1,508
  • 3
  • 19
  • 33
  • 1
    what's the problem with already packaged WEBrick? Or may be Mongrel as developmet web server (I meant one that require during development). Or do you want to know a good Production server for Rails3? – Nishant Dec 26 '10 at 20:17
  • I know at least 3 development web servers: Mongrel, WEBrick, Unicorn. I just want to know which one is better for web development with rail3. – Alpha Sisyphus Dec 26 '10 at 21:12
  • I had major problems with WEBrick on Windows (segfaults after every 2/3 requests). thin saved the day for me! – Zabba Jan 03 '11 at 16:58
  • For Windows I'm currently running thin under IIS 6. Here's a link to my blog post about it: http://transfermodeawesome.posterous.com/2011/06/installing-spree-on-windows-2003-server.html. It's a tad out of date but the ideas are still valid and there are a few choice tidbits on getting gems working on Windows. – Binary Phile Jan 12 '12 at 20:51

4 Answers4

22

I'd recommend the Thin server. Works great both on Linux and Windows. And it's very easy to install: gem install thin. If you are using Rails 3, you may want to add it do your Gemfile instead:

group :development do
  gem "thin"
end

And then run bundle install.

Once it's installed, you can run it with: rails s thin.

I find it a very fast and clean choice.

Just a note: thin depends on the eventmachine gem. I had a hard time making it work on Windows. You might want to link it to this specific ref in github to avoid trouble:

gem "eventmachine", :git => "http://github.com/eventmachine/eventmachine.git", :ref => "6c7997798"

As far as I remember, the last version of eventmachine does not build on Windows.

8

In Rails 3, you can use Unicorn with ease!

group :development do
  gem "unicorn"
end

Instead of rails s you start your server by simply running

unicorn

For more verbose output, use

unicorn -d
maček
  • 76,434
  • 37
  • 167
  • 198
4

Passenger 3 Standalone. As easy as passenger start.

On Windows the best is a VirtualBox instance running the same setup.

glebm
  • 20,282
  • 8
  • 51
  • 67
0

you might also consider using Unicorn as your web server for rails 3. For Windows, you can run mongrel cluster with apache or nginx.

armnov
  • 641
  • 1
  • 7
  • 16