1

I am new to Ruby/ RoR (like ... today new)

In trying my first real command:

rails g controller welcome index

This error appears:

.../lib/mysql2.rb:9: in 'require': Incorrect MySQL client library version! This gem was compiled for 5.5.16 but the client library is 5.1.53 (RunTimeError).

Any step by step help on how to fix this would be most appreciated.

Some background:

  • I did reinstall MySQL between installing RailsInstaller and running this, for other reasons.
  • Win 7 x64, running 32 bit MySQL
  • Ruby/Rails installed today from http://railsinstaller.org
eykanal
  • 26,437
  • 19
  • 82
  • 113
Dirk
  • 3,073
  • 4
  • 31
  • 36
  • I should add that if I run: `gem install mysql2 -- --with-mysql=config="c:/Program Files (x86)/MySQL/MySQL Server 5.5/bin/mysql_config"` It barfs with: `ERROR: Failed to build gem native extension.` and `could not create Makefile due to some reason, probably lack of necessary libararies and/or headers` – Dirk Oct 10 '11 at 17:23

1 Answers1

1

Do you have the development version of MySQL installed that has those libraries? And a C compiler installed?

It may be better to use the ruby native gem (if it still exists) for Windows. That's what we used to do in the Rails 2 days.

Sorry I can't be more help.

Ghoti
  • 2,388
  • 1
  • 18
  • 22
  • See JohnF's comment here for a solution: http://stackoverflow.com/questions/5841406/cannot-install-mysql2-gem – Dirk Oct 10 '11 at 20:24