Today I killed a few hours getting my Rails environment working on my brand new shiny 64 bit Windows Seven laptop. These instructions should also work with Windows Vista. I’m assuming you’re a fairly experienced Rails developer and just ended in dependency purgatory like I did for the last few hours.
Grab the MySQL developer version for your architecture (32 bit or 64 bit as appropriate) here.
Grab Ruby here. I used the 1.8.6 RC2 installer for my 64 bit architecture.
Add C:\Ruby\bin to your path. You can do this on Windows by opening the Start Menu, right clicking My Computer, clicking Properties, clicking Advanced / System Settings, and then adding it to the end of the PATH variable on the lower of the two dialogs. Apologies for inexact setting names, my computer is Japanese so I’m working from memory.
Verify that your path includes C:\Ruby\bin by opening a new command line and executing “path”.
Good to go? OK, execute:
gem install --no-rdoc --no-ri rails gem install mysql
You’ll get all manner of errors on that MySQL installation. That is OK.
- Here’s the magic: copy libmySQL.dll from here to C:\Ruby\bin . If you do not do this, you will get ugly errors on Rails startup about not being able to load mysql_api.so.
You should now be able to successfully work with Rails as you have been previously, even from your Windows machine, and you will amaze your Mac-wielding friends.