我想第一次設置rails。我已經制作了應用程序,我一直在關注很多指南。設置Ruby on Rails應用程序。安裝mysql的問題寶石
當我嘗試安裝MySQL寶石gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
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
--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=/usr/bin/ruby
--with-mysql-config
--without-mysql-config
在SO和谷歌環顧四周,有人說要做到:
gem install mysql --with-mysql-config=/usr/bin/mysql_config
,但我得到:
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --with-mysql-config=/usr/bin/mysql_config
關於如何讓這個工作的任何想法?
你在哪個平臺上?蘋果電腦? Linux呢? – AlistairH 2012-02-13 21:52:33
什麼分佈? Ubuntu的? Debian的? – iblue 2012-02-13 22:05:13
當我使用yum時,CentOS版本5.7 – Khalos 2012-02-13 22:10:54