problem setting multiple cookies

Eric Wong normalperson at
Wed Jun 22 02:02:55 EDT 2011

Jason Su <jason at> 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

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
> end
> Should I not be using OldRails?

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


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!


> I found this, which I think is somehow related to the fix:
> 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

More information about the mongrel-unicorn mailing list