On Dec 1, 7:07 pm, Jeff <[EMAIL PROTECTED]> wrote:
> On Dec 1, 6:57 pm, "Mislav Marohnić" <[EMAIL PROTECTED]>
> wrote:
>
> > On Tue, Dec 2, 2008 at 01:46, Jeff <[EMAIL PROTECTED]> wrote:
>
> > > /home/jcohen/sites/pw/current/vendor/rails/actionpack/lib/action_view/
> > > template_handler.rb:11:in `initialize':ArgumentError: wrong number of
> > > arguments (0 for 1)
>
> > Sounds more like an issue where you have mismatching framework versions. You
> > should have posted the full stack trace. Does every line come from vendored
> > rails, or did some framework load accidentally from a gem?
>
> Thanks!  I think you're onto something... the whole stack trace is
> below, but now I see that rake rails:update did not update the
> scripts; so it still had my 2.1 version of script/about, wheres the
> 2.2 version explicitly adds the rails_info directory to the load path.
>
> Methinks many other things didn't get updated, either.  What's the
> "right" way to make sure everything gets updated to 2.2.2?
>

Just in case anyone cares and to close this thread, part of the
solution involved changing the code in my custom template handler.
Seems like 2.2 broke 2.x syntax for custom handlers.

It used to be that you had to declare your handler with an initializer
like this:

class MyHandler < ActionPack::TemplateHandler

 def initialize(view)
  @view = view
 end

end

Now, the initializer must not accept any arguments at all:

 def initialize
 end

(or you can just leave it out altogether, of course).


This wasn't the only problem I had when I refroze my 2.1 app to 2.2,
but I thought I'd mention it in case it trips up anyone else.  I
didn't see this mentioned in the release notes or changelogs anywhere.

To be fair, Josh did mention template refactoring in the 2.2
ActionView changelog, but maybe in the future it would be better to
deprecate major changes for a release first.

Thanks
Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to