Here's what i used: gem install mysql --platform=ruby -- --with-mysql-include=C:\mysql-connector-c-noinstall-6.0.2-winx64\include --with-mysql-lib=C:\mysql-connector-c-noinstall-6.0.2-winx64\libWorks for mysql2 also.
Let us know what you find Luis, I'm experiencing the same issues as Craig. Unfortunately I've dumped over 6 hours into trying to get a working Windows 7 x64 + Ruby 2.0.0 + Mysql2 installation to work and it's just not happening. I'd love to see a fix.
--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyinstalle...@googlegroups.com.
To post to this group, send email to rubyin...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Dear Luis,
You cite this as a path to the solutionIt requires the use of dlltool.
Do you know where to find a dlltool.exe compiled by mingw64 (same level as the 64 bits devkit) ?
Hello Badal,
dlltool is part of the DevKit, you simply need to enable MinGW in the PATH by running "devkitvars.bat"
==> Thanks. I should have looked there. Shame on me !
gendef might require compilation from source:I pre-compiled it for you:
C:\Ruby200-x64\bin>gem install mysql2 --platform=ruby -- --with_opt-dir=C:\mysql-connector-c-noinstall-6.0.2-winx64
Fetching: mysql2-0.3.11.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with_opt-dir=C:\mysql-connector-c-noinstall-6.0.2-winx64'
This could take a while...
Successfully installed mysql2-0.3.11
1 gem installed
the command: gem install mysql2 --platform=ruby -- --with_opt-dir=C:\mysql-connector-c-noinstall-6.0.2-winx64
did not work for me, Error:checking for rb_thread_blocking_region()... yeschecking for rb_wait_for_single_fd()... yeschecking for rb_hash_dup()... yeschecking for rb_intern3()... yes*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack of necessarylibraries and/or headers. Check the mkmf.log file for more details. You mayneed configuration options.but I now realize didn't run it from C:\Ruby200-x64\bin I don't think that should matter.in a default command prompt, I had success with:
gem install --platform=ruby mysql2 -- --with-mysql-lib=C:\mysql-connector-c-noinstall-6.0.2-winx64\lib --with-mysql-include=C:\mysql-connector-c-noinstall-6.0.2-winx64\include
And after copying libmysql.dll to C:\Ruby200-x64\bin, creating the development db, setting the right connection string in \config\database.yml, rails server finally works.Thanks for all help, and not to complain unduly, but using the pre-patched ZIP is a security hole for a production server.If someone could create some short instructions for making gendef.exe from http://sourceforge.net/projects/mingw-w64/, perhaps using the DevKit gcc, I'd appreciate it.Perhaps gendef.exe might be included in DevKit... Off to make the suggestion.
Hello,On Sun, Aug 11, 2013 at 4:52 PM, mc2 <mark.c...@gmail.com> wrote:
the command: gem install mysql2 --platform=ruby -- --with_opt-dir=C:\mysql-connector-c-noinstall-6.0.2-winx64The option is --with-opt-dir, there is no underscore in there.
Please also note that the mysql connector lib do not work out of the box and needs to be regenerated, see the usage of gendef prior on this threa
gem install --platform=ruby mysql2 -- --with-mysql-lib=C:\mysql-connector-c-noinstall-6.0.2-winx64\lib --with-mysql-include=C:\mysql-connector-c-noinstall-6.0.2-winx64\include