Friday, December 16, 2011

argument out of range and 0.0 issue on rails

Argument out of range Exception on windows7 with Rails3 and model fields class type is float(0.0). Actually I was trying to use mysql2 gem on windows7 in Rails3.

How I fixed it in my case:
  • My system was x86 typed(windows7) and I had 32 bit mysql client installed in my machine with Rails 3.1 and Ruby 1.9.2
  • I downloaded libmysql.dll (32 bit) and placed it on windows/system32 and ruby/bin folder
  • I restarted my laptop and FIXED!
This is nothing but libmysql.dll version related issue with system!