Home > computer > Fixing “wrong number of arguments” Error w/Rails 1.2.3 Upgrade

Fixing “wrong number of arguments” Error w/Rails 1.2.3 Upgrade

March 28th, 2007

If you’ve just upgraded your Rails gem from 1.2.2 to 1.2.3 and are getting the following error on database hits..
wrong number of arguments (1 for 0)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/vendor/mysql.rb:566:in `initialize’

..note that updating RAILS_GEM_VERSION in environment.rb appears to be required. Running a 1.2.2 application on 1.2.3 (even when 1.2.2 and all dependencies installed) will yield this error. Whatever.

  • Share/Save/Bookmark

preston.lee computer , ,

  1. DT
    May 17th, 2007 at 09:53 | #1

    Thanks so much. Just saved me a couple of hours work

  2. Woofster
    June 3rd, 2007 at 20:24 | #2

    Yes! Thank you! Awesome tip. Very good. Kudos. Bless you. May all your children have white teeth and adroit but appropriate senses of humor!

  3. Michael
    June 13th, 2008 at 04:34 | #3

    Thanks a lot. I’ve been searching for this solution for a while.

  4. June 25th, 2008 at 13:17 | #4

    No problem :)

  1. No trackbacks yet.