0

I am having trouble requiring the mysql2 gem. On my local copy it works just fine but on the vm where I am trying to run my script the require fails. Here is the info for the VM.

Windows 7 64bit
Ruby 1.9.3
MySQL 5.6
mysql2 gem 0.3.11 x86-ming32

Here is the error I get when I require mysql2

LoadError: 126 The specified module could not be found.  - c:/Ruby193/.../mysql2.so

When I go and look in this directory the file mysql2.so is there.
Could this be attributed to running this on a 64 bit version of windows?

OK so I just scrapped the old VM and got a new instance but this time 32bit windows 7. I am still getting the same error when I require mysql2! HELP!

Zach
  • 885
  • 2
  • 8
  • 27

2 Answers2

0

It's probably caused by ruby being 32-bit and mysql being 62-bit.

Read this: http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

Steven Spasbo
  • 647
  • 7
  • 18
0

Ok so I reinstalled the MySQL connector/C to make sure I was running 6.0.2. Then I added the libmysql.dll from http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip and put it in my c:\Ruby\bin

and now it requires correctly!

Zach
  • 885
  • 2
  • 8
  • 27