From: Eric Wong <normalperson@yhbt.net>
To: "Lin Jen-Shin (aka godfat 真常)" <godfat@godfat.org>
Cc: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: About Unicorn Rack handler
Date: Thu, 5 Nov 2009 15:19:24 -0800 [thread overview]
Message-ID: <20091105231924.GB7131@dcvr.yhbt.net> (raw)
In-Reply-To: <56e58d960911050713h48790d01w120bec84c7ca0f3e@mail.gmail.com>
"Lin Jen-Shin (aka godfat 真常)" <godfat@godfat.org> wrote:
> 2009/11/5 Eric Wong <normalperson@yhbt.net>:
> > As I explained in the other email, this unfortunately can't ever give
> > you all the features that Unicorn has.
> >
> > I've made an effort to keep everything else as compatible and the
> > migration paths as easy as possible.
>
> Many, many thanks for your effort on Unicorn.
> It's awesome, in all ways. I would switch all services
> at my working place to Unicorn at some point.
Cool, good to know :)
> > Can you try and see if the USR2 handling of Unicorn allows
> > a transparent upgrade here? If it doesn't then I don't think
> > it's worth supporting an interface that's crippled compared
> > to using the plain `unicorn' command.
>
> I think it does work. This is start.rb:
>
> ###
> #!/usr/bin/env ruby
> require File.expand_path('app', File.dirname(__FILE__))
> require 'unicorn'
> Rack::Handler.register('unicorn', 'Unicorn')
> Ramaze.start(:adapter => 'unicorn', :port => 7000)
> ###
>
> It won't work if I invoke start.rb like this:
> $ ruby start.rb
> (perhaps it's impossible to get the `ruby' ?)
> but it does work if I invoke this way:
> $ ./start.rb
> (tested with different debug output in lib/unicorn.rb)
Yeah, running "ruby start.rb" throws off $0 unless start.rb is in $PATH.
"ruby ./start.rb" should work, too, but it's ugly. I think there
are/were cases where "#!/usr/bin/env ruby" won't even work as a shebang,
too.
> On the other hand, `ramaze' command won't work,
> and I guess it's because it uses `rackup', which
> you've explained why it won't.
>
> I am wondering.. Could `rackup' be fixed for this?
> For instance, use the same way as `unicorn' in `rackup'?
> If so, I would be glad to try to fix that in rackup.
> I would try it later in my free time.
It would require `rackup' to do a "require 'unicorn'" before it does any
option parsing. That would be unnecessarily intrusive if one has
Unicorn installed but wants to test with a different server.
--
Eric Wong
_______________________________________________
mongrel-unicorn mailing list
mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
prev parent reply other threads:[~2009-11-05 23:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 12:37 About Unicorn Rack handler Lin Jen-Shin (aka godfat 真常)
2009-11-04 17:07 ` Eric Wong
2009-11-05 4:43 ` Lin Jen-Shin (aka godfat 真常)
2009-11-05 4:47 ` Lin Jen-Shin (aka godfat 真常)
2009-11-05 7:29 ` Eric Wong
2009-11-05 7:28 ` Eric Wong
2009-11-05 15:13 ` Lin Jen-Shin (aka godfat 真常)
2009-11-05 23:19 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091105231924.GB7131@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=godfat@godfat.org \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).