我正在尝试使用基本的“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