Tuesday, October 20, 2009

Ralis 2.2 with mysql Resolved errors

When you work in Rails 2.2 , with mysql you may get following error after installing mysql driver and trying to run the project.

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install
the mysql gem and try again: gem install mysql.
rake aborted!
126: The specified module could not be found. - C:/Ruby/lib/ruby/gems/1.8/gems
/mysql-2.8.1-x86-mswin32/lib/1.8/mysql_api.so

The problem for above error is, MySQL 5.1 client library doesn't play well with Rails.

Solution is

  • copy the downloaded file to C:\Ruby\bin (or wherever you installed Ruby)

  • restart MySQL server

3 comments: