已修改 database.yml: ~/mds/config$ cat database.yml
#
#
development: adapter: mysql2 encoding: utf8 reconnect: false database: mds_development pool: 5 username: root password: socket: /var/run/mysqld/mysqld.sock
test: adapter: mysql2 encoding: utf8 reconnect: false database: mds_test pool: 5 username: root password: socket: /var/run/mysqld/mysqld.sock
production: adapter: mysql2 encoding: utf8 reconnect: false database: mds_production pool: 5 username: root password: socket: /var/run/mysqld/mysqld.sock
运行 rake:
~/blog$ rake db:create
rake aborted!
Please install the mysql2 adapter: gem install activerecord-mysql2-adapter
(mysql2 is not part of the bundle. Add it to Gemfile.)
提示要安装 gem install activerecord-mysql2-adapter 安装: ~/blog$ gem install activerecord-mysql2-adapter Building native extensions. This could take a while... ERROR: Error installing activerecord-mysql2-adapter: ERROR: Failed to build gem native extension.
/home/liucc/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... no 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... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed ***
求助为何安装 MYSQL adapter 报错!?!