I needed to use rack 1.1 or greater, so I patched part of the process
method in module ActionController::Integration::Session like so:

set_cookie_header_prepared = @headers['Set-Cookie'].is_a?(String) ?
                                          @headers['Set-Cookie'] :
                                          @headers['Set-
Cookie'].join()

(set_cookie_header_prepared || "").split("\n").each do |cookie|   #
Patched to be compatible with rack > 1.0.1 !!
  name, value = cookie.match(/^([^=]*)=([^;]*);/)[1,2]
  @cookies[name] = value
end

Now my test work fine!







On 22 Dez. 2010, 01:58, Enrico Teotti <enrico.teo...@gmail.com> wrote:
> Hi Stan,
> today when I was running my cuke features on a Rails app I had exactly
> the same problem you had.
>
> undefined method `match' for #<Array:0x10a770a78> (NoMethodError)
>
> This was a fresh install, the same features were running fine on my
> office workstation.
>
> These are the gems of my Rails (2.3.4) app:
>
> http://pastie.org/1396577
>
> And after two hours of hammering my head, and right before deciding to
> stop working in IT and open a bar on a lonely beach on a remote
> island... I found out that the error was caused by:
>
> rack (1.2.1)
>
> rolling it back to rack 1.0 (and even 1.0.1) solved the problem for me.
>
> It's not a Radiant related problem, but I really hope by posting my
> solution I'll save some time to the future generation (I hope nobody)
> who might incur in this cryptic problem,
>
> Regards,
> Enrico
>
> --
> Enrico Teotti
> IT consultant, accessible web sites and web applications
> currently working @http://www.redant.com.au
> Sydney, NSW, Australia
> enrico.teo...@gmail.com
> mobile (AU) +00610416748450
>
> http://teotti.com

Reply via email to