Installing a rails mysql stack on my laptop was a bit tricky

I’ll keep this short: firstly I’ve downloaded the ruby windows installer from here , at the time of writing the version was _1.9.2-p0. _The problem with this one is that ruby crashes into oblivion from time to time (mostly after lots of page refreshes); after a googler search I’ve found out it’s a windows bug (yeah on *nix works like a charm) so not much really more to do except waiting for the next release, compilling myself the latest version or if you just want to be safe just get the 1.8.7 or .6 release, should work just fine (that’s what I have on my desktop with Rails 2.3.5 and works really great - for developing purposes.

Ok, time to install rails: _gem install rails -v=2.3.5 -no-rdoc -no-ri _(to be noted I’m using an older version you can skip the -v to install the latest Rails 3). The last two parameters should skip installing the offline documentation (I don’t really use that, so why bother installing all those small files...)

Next comes the mysql part, this was fun: the normal way to do it is to install gem install mysql, have your mysql/bin (that’s where libmySQL.dll resides) into windows path variable and hope everything works just fine. If it doesn’t, well you can try the classic hack of putting (and by that I mean copying that moving the file) libmySQL.dll intro ruby/bin folder. Needless to say, none worked on my setup.

My way: gem install mysql2, after I modified my database.yml to use the adapter: it worked ! Kudos to brianmario for coding that.

All done !

Biography:

Tagged under: