我正在嘗試使用基本的「Create a blog in 20 minutes」Rails screencast,但已經遇到了絆腳石。未能安裝activerecord-jdbcmysql-adapter gem
當我嘗試耙db:migrate時,我得到關於沒有安裝gem activerecord-jdbcmysql適配器的錯誤。當我嘗試安裝它時,我被告知它不存在。
如果我試圖簡單地安裝mysql,我會得到各種各樣的瘋狂。
我在Mac OS X 10.6.2上運行它,我的安裝都是通過gem完成的。我的基本設置工作(Hello world!)。
以下是錯誤日誌:
$ rake db:migrate (in /Users/xxxx/Sites/blog) rake aborted!
Please install the jdbcmysql adapter:
gem install activerecord-jdbcmysql-adapter
(no such file to load -- active_record/connection_adapters/jdbcmysql_adapter)(See full trace by running task with --trace)
$ sudo gem install activerecord-jdbcmysql-adapter
ERROR: could not find gem activerecord-jdbcmysql-adapter locally or in a repository
$ sudo gem install mysql 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
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... yes
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 * 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=/opt/local/bin/ruby
--with-mysql-config
--without-mysql-config
--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-mysqlclientlib
--without-mysqlclientlib --with-mlib
--without-mlib --with-mysqlclientlib
--without-mysqlclientlib --with-zlib
--without-zlib --with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib --without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib --without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mygcclib --without-mygcclib
--with-mysqlclientlib
--without-mysqlclientlibGem 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
我遇到了同樣的問題,我昨天剛安裝了NetBeans。 Java版本沒有幫助,重新安裝Rails 2.3.8也不起作用。有誰知道目前的修復程序是什麼? – sscirrus 2010-07-04 22:31:14