Jason Su <[email protected]> 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 - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to