Failing to install activerecord-jdbcmysql-adapter gem

Posted by Phil Sturgeon on Stack Overflow See other posts from Stack Overflow or by Phil Sturgeon
Published on 2010-04-21T08:22:51Z Indexed on 2010/04/22 8:33 UTC
Read the original article Hit count: 563

Filed under:
|

I am trying to follow the basic "Create a blog in 20 minutes" Rails screencast but have hit a stumbling block already.

When I try to rake db:migrate I get errors about the gem activerecord-jdbcmysql-adapter not being installed. When I try to install it, I am told it doesn't exist.

If I try to simply gem install mysql I get all sorts of madness appearing.

I am running this on Mac OS X 10.6.2 and my installation was all done through gem. My basic setup works (Hello world!).

Here is the error log:

$ 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-mysqlclientlib

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

© Stack Overflow or respective owner

Related posts about rubygems

Related posts about ruby