Installing mysql2 (0.2.17) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
C:/Ruby193/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for main() in -llibmysql... no
*** 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.
上記のエラーは、MySQLのライブラリが検出できないため発生しているようです。
対処方法としては、gemコマンドにオプションを指定して、MySQL2をインストールします。
C:\Users\yasu\Downloads\dbloete-masquerade-fdf8ef1>subst X: "C:\Program Files (
x86)\MySQL\MySQL Server 5.5"
C:\Users\yasu\Downloads\dbloete-masquerade-fdf8ef1>gem install mysql2 -v 0.2.17
-- --with-mysql-dir=X: --with-mysql-lib=X:\lib
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed mysql2-0.2.17
1 gem installed
Installing ri documentation for mysql2-0.2.17...
Installing RDoc documentation for mysql2-0.2.17...
C:\Users\yasu\Downloads\dbloete-masquerade-fdf8ef1>subst X: /D
【参考URL】
http://stackoverflow.com/questions/3608287/installing-mysql2-gem-for-rails-3
0 件のコメント:
コメントを投稿