unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: problem setting multiple cookies
Date: Wed, 22 Jun 2011 06:02:55 +0000	[thread overview]
Message-ID: <20110622060255.GA1838@dcvr.yhbt.net> (raw)
In-Reply-To: <BANLkTinK9tPc6dHu==T=sDFMfjQdYhwp3w@mail.gmail.com>

Jason Su <jason@lookbook.nu> wrote:
> Hey Eric,
> 
> Actually I think I am using OldRails -- don't know what it is or why
> I'm doing it, but this is in my config.ru:

It might be because you were on Rails 2.2 or earlier and upgraded?

> map '/' do
>   if RAILS_ENV != 'production'
>     begin
>       require 'rack/bug'
>       use Rack::Bug, :password => nil
>     rescue LoadError
>     end
> 
>     use Rails::Rack::Static
>   end
> 
>   run Unicorn::App::OldRails.new
> end
> 
> Should I not be using OldRails?

OldRails was for Rails <= 2.2, so you should probably try this instead:

  run ActionController::Dispatcher.new

This should use the pure Rack backend that avoids the old CGI
and CGIWrapper code which Rails <=2.2 relied on.

> I'm also trying to upgrade to Rails 2.3.11 again. Here's the error
> that's stopping me:
> 
> You have a nil object when you didn't expect it!
> You might have expected an instance of Array.
> The error occurred while evaluating nil.split You have a nil object
> when you didn't expect it!

<snip>

> I found this, which I think is somehow related to the fix:
> https://gist.github.com/826692
> 
> Do you see anything that looks familiar?

I haven't seen it before, but it looks to be on the right track.

OldRails uses the CGIWrapper code which is based on the original
code in Mongrel, too.

If you avoid CGIWrapper, you should be able to avoid the
workarounds/issues with it like the above gist.

-- 
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


  parent reply	other threads:[~2011-06-22  6:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 23:40 problem setting multiple cookies Jason Su
2011-06-21  0:06 ` Eric Wong
2011-06-21  0:25   ` Jason Su
2011-06-21  0:46     ` Eric Wong
2011-06-21  1:34       ` Jason Su
2011-06-21  1:35         ` Jason Su
2011-06-21  2:15         ` Eric Wong
2011-06-21  2:48           ` Jason Su
2011-06-21  3:15             ` Eric Wong
2011-06-21  3:38               ` Jason Su
2011-06-21 18:29                 ` Eric Wong
2011-06-22  1:01                   ` Jason Su
2011-06-22  1:59                     ` Eric Wong
2011-06-22  4:18                       ` Jason Su
2011-06-22  4:20                         ` Jason Su
2011-06-22  6:02                         ` Eric Wong [this message]
2011-06-22 12:51                           ` Jason Su

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=20110622060255.GA1838@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --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).