Rails 2.2.2 introduce new mysql problems in Windows

I have two old rails 1.0 apps that I never updated. They are using fcgi which was fairly horrible way of running it and there is new passenger way, which is how it should have been from the start (why people like php, it just works). Anyway I decided to upgrade them totally with fresh rails as well as using passenger.

So I started to upgrade rails and it went fine. Then I tried to run them, I got:

no such file to load -- mysql

OK, this is easy to resolve:

gem install mysql

Right? Wrong :)! It craps out, supposedly in installing docs, in reality it doesn’t install anything. And this is the real problem. It seems that gem for windows is faulty. The problem in my view is that you get error message that mysql.so is missing (which it does).

So I searched the net, same way you are now (as I suspect many people will get this problem) and here is simple solution:

Copy libmysql.dll from the MYSQL installation to ruby/bin.

That is it. Don’t think why and how, just do that and it will work and hopefully this situation will be remedied in the future.

BTW I’ve seen people revert to older rails versions after not being able to find ways to resolve this issue.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s