Jay Levitt <jlevitt at tiptap.com> wrote:> I''m tired of the bugginess of Webrick, so I want to upgrade to
> something modern for developing Rails apps on my Mac, and I''m a
bit
> out of the loop. Is Unicorn a drop-in replacement these days in
> development mode? Does it have advantages or disadvantages compared to
> Thin? I don''t even know what capabilities I should care about,
but
> some obvious ones are:
unicorn should be a drop-in replacement, you shouldn''t need a
unicorn-specific config file for development.
The "unicorn_rails"[1] command was designed Rails 1.x/2.x users, while
"unicorn" is a better fit for Rails 3 (and all Rack frameworks),
but either works for Rails 3
Thin is a great server and I''ve had no issues with Webrick for
development, either.
You don''t have to worry about slow clients hitting Unicorn in
development, so you can forgo nginx for development.
> - Doesn''t stop logging after a while (hi, Webrick)
This is not a problem I''ve heard of with either server. It /may/ be an
issue with the Rails buffered logger implementation, though. The Ruby
standard library Logger used by Unicorn does no buffering.
> - Logs to STDOUT or STDERR
This is the default, and Unicorn explicitly disables output buffering
on both of these.
> - Reloads everything that ought to be reloaded on each request
Set RAILS_ENV=development in your environment.
> - Works well with 1.9.2
Yes, I regularly test against 1.8.7, 1.9.2, 1.9.3dev and trunk.
> Any advice? I''d think this would be a FAQ, but I haven''t
found any
> discussions on the topic.
I don''t do much Rails development, but everything /should/ work fine.
I
will never officially support non-Free systems, but from what I''ve
heard
it works fine on the ones names after fruits.
Others on this list can hopefully chime in, too.
[1] - There''s some confusion that was the result of
"unicorn_rails"
being an automatic compatibility layer for old Rails. If I
could to do it all over again, I''d leave
"unicorn_rails" out
and force folks to setup the compatibility layer themselves
to learn how Rack works.
--
Eric Wong