Thursday, March 10, 2011

Windows: Rails with MySQL Problem

After successfully installing the Ruby 1.8.7 and Rails 2.3.5, MySQL 2.8.1 x86-mingw32 gems

When we try to create a db using the following command

>> rake db:create

It throws the following error:

!!! 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.
- */1.8/gems/mysql-2.8.1-x86-mingw32/lib/1.8/mysql_api.so

(See full trace by running task with --trace)
Process finished with exit code 1

To solve that we need keep the libmySQL.dll file under RUBY_HOME/bin

No comments: