rails 1.1.6 and ruby 1.8.6

written by benjamin on July 6th, 2007 @ 04:43 PM

While trying to install omdb on a fresh MacBookPro, we experienced strange error messages from active record. We just tried to access the database and got errors like this:

ArgumentError: wrong number of arguments (1 for 0) from .../activerecord-1.14.4/lib/active_record/vendor/mysql.rb:551:in `initialize' from .../activerecord-1.14.4/lib/active_record/vendor/mysql.rb:551:in `new' from .../activerecord-1.14.4/lib/active_record/vendor/mysql.rb:551:in `scramble41' from .../activerecord-1.14.4/lib/active_record/vendor/mysql.rb:141:in `real_connect'

It seems that the constructor for SHA1 has changed in ruby 1.8.6 and therefore the rails 1.1.6 mysql adaptor is broken, giving this error message. So what's the conclusion? Simply make sure you're using ruby 1.8.5. If you're using Mac and Darwinports, see this post on how to do this. The subversion-revision you need is 21127.

Comments