2011-07-18 4 views
0

私はちょうど新しい機能などを追加するために、すでに構築されている新しいアプリケーションを担当しました。残念ながら、それは数年前に作られ(レール2.1を使って)、mysql(私はpostgresを好む)を使います。私はmysql gemをインストールしようとしていますので、ローカルマシンのコードを混乱させる可能性があり、次のエラーが発生しています。私は、ファイルが存在していたことを確認するディレクトリは/ usr/local/mysqlの/ binに/ mysql_configをチェックmysql gem install railsにエラーがあります

$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config 
Password: 
Building native extensions. This could take a while... 
ERROR: Error installing mysql: 
    ERROR: Failed to build gem native extension. 

/opt/local/bin/ruby extconf.rb --with-mysql-config=/usr/local/mysql/bin/mysql_config 
checking for mysql_ssl_set()... no 
checking for rb_str_set_len()... no 
checking for rb_thread_start_timer()... no 
checking for mysql.h... no 
checking for mysql/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 
    --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=/opt/local/bin/ruby 
    --with-mysql-config 


Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection. 
Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out 

(それがない)...私はDMGファイルでMySQLをインストール(V 5.1)MySQLのサイトから。

率直に言えば、私はこの問題をどのように解決するかについて、迷っています。助言がありますか?

ありがとうございます!

+0

マシンにmysql.hが実際に存在するかどうかを確認してください。/usr/local/mysql/includeになければなりません。それがない場合は、/ usr/local/mysql/bin/mysql_configを実行した結果を投稿してください。 – eugen

答えて

1

私は、mysqlヘッダファイルがdmg-fileに含まれているとは思いません。 HomebrewまたはMacportのいずれかをインストールし、

関連する問題