Ruby.Exe Unable To Locate Component Readline.Dll

I just installed ruby 1.8.7 on a Windows machine and when I started IRB I got this error:

ruby.exe Unable To Locate Component readline.dll

The fix:

  1. Download the readline binary zip from here.
  2. Unzip the file.
  3. Change directory to the new directory created by unzipping the file.
  4. Change directory to the bin directory.
  5. Copy the readline5.dll file.
  6. Change directory to your ruby/bin directory (for me this is C:\ruby\bin).
  7. Paste readline5.dll file there.
  8. Rename file readline.dll.

As long as your rubybin directory is set in your PATH environment variable, that should take care of the problem.

Libmysql.Dll Was Not Found

I recently upgraded my laptop to 4 Gigs of RAM and needed to upgrade Windows to the 64 bit version in order to utilize it. After installing everything and getting it all setup, I needed to do some work on an existing Rails application. I pull it out of my Subversion repository, create the dev and test databases, and run ‘rake db:migrate’ only to get this message:

LIBMYSQL.dll was not found

I’m pretty confident that MySQL is installed correctly and I have the databases and permissions setup correctly. A quick Google search tells me that others have experienced the same issue and they were able to resolve it by finding the dll and copying it to the ruby/bin directory. So…

copy "C:\Program Files\MySQL\MySQL Server 5.0\bin\libmySQL.dll" C:\ruby\bin\

OK, fire up rake again and I get the same error. Back to Google again and after a bit more digging I find that there is an issue with Ruby support in the 64 bit version of MySQL. So I head back to the MySQL website and download the 32 bit zip version without the installer. Open it, navigate to the bin directory and copy libmysql.dll to the ruby/bin directory. This has taken care of the issue and I haven't had any problems working with the 64 bit version of MySQL using the 32 bit library in Ruby.