unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Unicorn for Rails development mode?
@ 2011-08-28 13:35 Jay Levitt
  2011-08-28 23:14 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Jay Levitt @ 2011-08-28 13:35 UTC (permalink / raw)
  To: mongrel-unicorn

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:

- Doesn't stop logging after a while (hi, Webrick)
- Logs to STDOUT or STDERR
- Reloads everything that ought to be reloaded on each request
- Works well with 1.9.2

Any advice? I'd think this would be a FAQ, but I haven't found any
discussions on the topic.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Unicorn for Rails development mode?
  2011-08-28 13:35 Unicorn for Rails development mode? Jay Levitt
@ 2011-08-28 23:14 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2011-08-28 23:14 UTC (permalink / raw)
  To: unicorn list

Jay Levitt <jlevitt@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
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-29  1:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-28 13:35 Unicorn for Rails development mode? Jay Levitt
2011-08-28 23:14 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).