I am using below command to install mysql2 gem:
gem install mysql2 -- '--with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.6\include" --with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.6\lib"'
but getting below error
C:\Ruby200\bin>gem install mysql2 -- '--with-mysql-include="C:\Program Files\MyS
QL\MySQL Server 5.6\include" --with-mysql-lib="C:\Program Files\MySQL\MySQL Serv
er 5.6\lib"'
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-include="C:\Program Files\MySQL\M
ySQL Server 5.6\include" --with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5
.6\lib"'
This could take a while...
The system cannot find the path specified.
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb --with-mysql-include="C:\Program Files\My
SQL\MySQL Server 5.6\include" --with-mysql-lib="C:\Program Files\MySQL\MySQL Ser
ver 5.6\lib"
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using --with-mysql-dir=C:\Program Files\MySQL\MySQL Server 5.6
-----
checking for main() in -llibmysql... yes
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
creating Makefile
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.
3.15 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/my
sql2-0.3.15/gem_make.out
i am unable to understand what is causing this as all the directories mentioned are already present.
below is my gem env
C:\Ruby200\bin>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.2
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby200/lib/ruby/gems/2.0.0
- RUBY EXECUTABLE: C:/Ruby200/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby200/bin
- SPEC CACHE DIRECTORY: D:/Users/zzuj001/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby200/lib/ruby/gems/2.0.0
- D:/Users/zzuj001/.gem/ruby/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://rubygems.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://rubygems.org/
- http://gems.github.com
- SHELL PATH:
- C:\Ruby200\bin
- C:\Ruby200\bin
- C:\Windows\system32
- C:\Windows
- C:\Windows\System32\Wbem
- C:\Windows\System32\WindowsPowerShell\v1.0\
- c:\Program Files\Microsoft SQL Server\100\Tools\Binn\
- c:\Program Files\Microsoft SQL Server\100\DTS\Binn\
- c:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\
- C:\PROGRA~1\IBM\SQLLIB\BIN
- C:\PROGRA~1\IBM\SQLLIB\FUNCTION
- C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL
- C:\Program Files\HP\Virtual User Generator\strawberry-perl\perl\bin
- C:\Program Files\HP\Unified Functional Testing\bin
- C:\Program Files\MySQL\MySQL Utilities 1.3.6\`enter code here`
I am always getting "The system cannot find the path specified.". Could this be the reason of this. I've tried including mysql dir and mysql config while installing but no success.
Below is the error that i am getting with mysql connector:
D:\Users\zzuj001>gem install mysql2 --platform=ruby -- '--with-mysql-dir="c:\mys
qlconnector"'
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-dir="c:\mysqlconnector"'
This could take a while...
The system cannot find the path specified.
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb --with-mysql-dir="c:\mysqlconnector"
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using --with-mysql-dir=c:\mysqlconnector
-----
checking for main() in -llibmysql... yes
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /lib
-----
creating Makefile
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.
3.15 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/my
sql2-0.3.15/gem_make.out