Forum: Ruby on Rails Install mysql2 gem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3218124dc039bf9afba426245deaaf13?d=identicon&s=25 Tsolmon Narantsogt (Guest)
on 2014-06-09 11:27
(Received via mailing list)
Hello Folks.

I want to install mysql2 gem on my Windows Machine.

Mysql installed on that path : C:\Program Files (x86)\MySQL Server 5.5

and i following below command but its occured that error.


gem install mysql2 -v=0.3.11 --platform=ruby --
--with-mysql-include=C:\Program Files (x86)\MySQL Server 5.5\include
--with-mysql-lib=C:\Program Files (x86)\MySQL Server 5.5\lib
--with-mysql-dir=C:\Program Files (x86)\MySQL Server 5.5

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
        ERROR: Failed to build gem native extension.

        C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
--with-mysql-include=C:\Program Files (x86)\MySQL Server 5.5\include
--with-mysql-lib=C:\Program Files (x86
r 5.5\lib --with-mysql-dir=C:\Program Files (x86)\MySQL Server 5.5
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe: No such file or directory --
extconf.rb (LoadError)

Gem files will remain installed in
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11 for
Results logged to

Can anyone help me?.
This topic is locked and can not be replied to.