views:

37

answers:

1

I have latest Xcode Tools 3.2.4 installed. Just whenever I try to install any gem, for example, the MySQL gem, such error occurs:

VNMB:rails2app ABC$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- \

--with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \ --with-mysql-include=/usr/local/mysql/include Password: Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension.

/Users/ABC/.rvm/rubies/ruby-1.8.7-p302/bin/ruby extconf.rb --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include 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... yes checking for mysql_query() in -lmysqlclient... no

Gem files will remain installed in /Users/ABC/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection. Results logged to /Users/ABC/.rvm/gems/ruby-1.8.7-p302/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

A: 

Try installing mysql from the macports/homebrew.

Tass