Apuntes Rails

Apuntes de Ruby on Rails, programación en GNU/Linux y Mac

Problema con Mongrel y los HEADERS

TAGS: None

Resulta que al desplegar una app con un servidor mongrel me fallan las funciones ajax. Mirando el archivo de logs de mongrel veo lo siguiente:

  1.  
  2. tail -n 100 log/mongrel.log
  3.  
  4. Error calling Dispatcher.dispatch #<NoMethodError: You have a nil object when you didn‘t expect it!
  5. You might have expected an instance of Array.
  6. The error occurred while evaluating nil.split>
  7. /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/cgi_process.rb:54:in `dispatch_cgi’
  8.  

A través de aquí meentero que es problema del action pack y modifico el archivo cgi_process.rb:54

cambio:

  1.  
  2.  if headers.include?(‘Set-Cookie’)

por :

  1. if headers[‘Set-Cookie’]

Reinicio el servidor y andado!!

  1.  
  2.  mongrel_rails stop -P log/mongrel3001.pi
  3.  
  4.  mongrel_rails start -d -e development -p 3001 -P log/mongrel3001.pi</code>

TAGS: None

Leave a Reply

© 2009 Apuntes Rails. All Rights Reserved.

This blog is powered by Wordpress and the Magatheme Wordpress Theme by Mid MO SEO.