Merb + DataMapper + MySQL + Windows
※以下、Windows(Vista Biz)のハナシ、他のWinは知りません。
MySQL を DataMapper 上で動かすにはgem"do_mysql"をインストールすればいいと思ったけど、インスコできず。
id:taigouさんに、こんなのがあるよって教えてもらった。
do_mysql-win32
さっそくと思ってやってきたけど、うまくインスコできず。
チャレンジしてみたこと。
- サイトからzipをDLして解凍
- コマンドプロンプトで解凍したフォルダに移動し
>gem build do_mysql-0.9.7.gemspec ERROR: While executing gem ... (Gem::InvalidSpecificationException) [".gitignore", "README.txt"] are not files
-
- エラーで失敗
- エラーメッセージに従って(?)
- do_mysql-0.9.7-patched フォルダにある .gitignore ファイルをコピー
- README ファイルを README.txt にリネーム
- リベンジ
>gem build do_mysql-0.9.7.gemspec WARNING: description and summary are identical Successfully built RubyGem Name: do_mysql Version: 0.9.7 File: do_mysql-0.9.7.gem
-
- なんか警告が出ているけど成功したっぽい
- gem のインストール
- 以下のエラーが出て失敗。
>gem install do_mysql-0.9.7.gem Building native extensions. This could take a while... ERROR: Error installing do_mysql-0.9.7.gem: ERROR: Failed to build gem native extension. C:/_work/languages/ruby/bin/ruby.exe extconf.rb checking for mysql.h... no checking for main() in libmysql.lib... no checking for mysql_query() in mysql.h... 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. 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 --srcdir=. --curdir --ruby=C:/_work/languages/ruby/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 --with-libmysqllib --without-libmysqllib Gem files will remain installed in C:/_work/languages/ruby/lib/ruby/gems/1.8/gems/do_mysql-0.9.7 for inspection. Results logged to C:/_work/languages/ruby/lib/ruby/gems/1.8/gems/do_mysql-0.9.7/ext/gem_make.out
うーん、無理なのかな?