On Aug 23, 2:21 am, Tim Uckun <timuc...@gmail.com> wrote:
> Hey all.
>
> I have two apps. One is a rails3 app and the other is a rails 2 app.
> Using proxying I am routing actions in the myapp.com/foo to the rails2
> app.
>
> It almost works! I can set a session variable and a cookie variable on
> the first app (myapp.com) and then read them on the second app
> (myapp.com/foo).
>
> It only works the first time though. If I go back to myapp.com and
> then revisit myapp.com/foo the rails2 application crashes with the
> error NameError (uninitialized constant
> ActiveSupport::HashWithIndifferentAccess):
>
> This error is raised when any attempt to access the session variable is made.
>

Well it looks like the core issue is that HashWithIndifferentAccess
became ActiveSupport::HashWithIndifferentAccess in rails 3. The
session is a serialized ruby object which somewhere is saying that it
contains an instance of class ActiveSupport::HashWithIndifferentAccess
and rails 2 is complaining that it doesn't know what that is.
>From what you've said I'm not sure why it works the first time. It
could be that something on the second request is storing such a hash
or that a development mode class loading oddity means that initially
ActiveSupport::HashWithIndifferentAccess is able to find the top level
class. You may be able to solve this by defining
ActiveSupport::HashWithIndifferentAccess in your rails 2 app


Fred

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to