can not install mysql2
Added by Mine Red over 11 years ago
Hi all,
when i install mysql2 gem file system display a error message as below.
my mysql version is 5.5 and install patch is "C:\Program Files\MySQL\MySQL Server 5.5\bin", ruby version is 1.9.3-p392.
please help, thanks!
error information:
C:\Redmine\redmine-2.3.3>gem install mysql2Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
- extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
C:/Ruby193/bin/ruby.exe extconf.rb
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
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby193/bin/ruby
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
extconf.rb:37:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError
)
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.
3.13 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.13/ext/mysql2/g
em_make.out
Replies (5)
RE: can not install mysql2
-
Added by Ivan Cenov over 11 years ago
Same to me with 0.3.14; I don't know how to proceed and stuck to 0.3.11 in Gemfile.
Attached are my logs
gem_make.out (1.96 KB) gem_make.out | |||
mkmf.log (57.4 KB) mkmf.log |
RE: can not install mysql2
-
Added by Ivan Cenov over 11 years ago
I upgraded libmysql.dll from v. 6.0.2 to v. 6.1.2 (from http://dev.mysql.com/downloads/connector/c/) but nothing changed ... no success.
Where can be found these:
C:/Ruby193/bin/ruby.exe extconf.rb checking for ruby/thread.h... no 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 checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed ***
RE: can not install mysql2
-
Added by Martin Denizet (redmine.org team member) over 11 years ago
It seems people running Redmine on Windows run into many issues. How about doing a Linux VM?
RE: can not install mysql2
-
Added by Ivan Cenov over 11 years ago
I am running Redmine on Windows since October 2010 and have had only few issues. Above issue, I suppose, is not Windows or Linux related. In my opinion, something is not installed right way or some option should be given somewhere for building native extensions. More reading is needed here.
RE: can not install mysql2
-
Added by Ivan Cenov over 11 years ago
Yes, as I said, more reading is needed...par example at https://github.com/brianmario/mysql2. The following command installs mysql2:
D:\>gem install mysql2 -- --with-mysql-dir=C:\mysql-connector-c-6.1.2-win32