MySQL 5.1 with Rails 2.3/Ruby 1.8.6 on Windows doesn’t work

The title says it all. I wish Ruby on Rails wasn’t so difficult to get set up on Windows. It sounds like most Ruby on Rails developers are Mac OS X or Linux users.

I was just trying to get a basic app set up with MySQL 5.1, Rails 2.3 and Ruby 1.8.6 and got this error when trying to run rake db:migrate:

rake aborted!
undefined method `each’ for #

I found an answer here:

http://www.nabble.com/rake-aborted!-undefined-method-%60each%27-for–%3CMysql:-td20760472.html

Looks like most people uninstalled MySQL 5.1 and went back to 5.0. People also seemed to have better luck with Postgresql.

Comments 1

  1. rob wrote:

    I’m running MYSQL 5.1 and had a similar problem. I have Ruby 1.8.6. I followed these instructions and the undefined method error was resolved when running rake.
    > The problem is that libmysql.dll shipped with Mysql doesn’t play well
    > with ruby 2.2..
    >
    > The solution is to download the libmysql.dll from:
    >
    > http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll

    Posted 21 Apr 2009 at 12:17 pm

Post a Comment

Your email is never published nor shared. Required fields are marked *