Danger Angell
Danger Angell

Reputation: 349

Rails 2.3.11 app to Ruby 1.9.2 throwing "implicit argument passing of super from method defined by define_method() is not supported" errors

Just dropped Rails Installer on a new Windows 7 box. Cloned my Rails 2.3.11 app and installed all gems with no issues, but as I started clicking around the app I'm running into this in several places:

"implicit argument passing of super from method defined by define_method() is not supported. Specify all arguments explicitly."

Read a few threads relating to the same message, but I'm not grasping what's going on in my case.

I did notice the error popping up on a search form using SearchLogic and on my login form which is using AuthLogic. Wondering if there's a correlation between this issue on 1.9.x and these two *Logic plugins?

For example one of the errors is reference this line in my login form?

<%= f.text_field :login %>

Any guidance is appreciated.

Upvotes: 0

Views: 317

Answers (2)

Danger Angell
Danger Angell

Reputation: 349

Turns out I'm an idiot and I was trying to run my Rails 2.3.8 app on Ruby 1.9.2 :-)

Upvotes: 0

RubyRedGrapefruit
RubyRedGrapefruit

Reputation: 12224

Are you using a FormBuilder, perhaps ErrorHandlingFormBuilder from the old Advanced Rails Recipes book? If so, you need to look at the form builder code.

You will see this code:

  build_shell(field, options) do
    super
  end

It's that "super" line that is causing your problem. Change it to:

  build_shell(field, options) do
    super(name, *args)
  end

Upvotes: 1

Related Questions