Can you try the following command. sudo env ARCHFLAGS='-arch i386' gem install mysql -v=2.7 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Kem Mason wrote: > Frederick Cheung wrote: >> On 7 Sep 2008, at 12:47, Doug Livesey wrote: >>> ld: warning in /usr/local/mysql/lib/libmysqlclient.dylib, file is >>> not of >>> required architecture >> >> This appears to be the key bit: you're asking for an i386 executable >> but that library is apparently a different architecture (lipo - >> detailed_info /usr/local/mysql/lib/libmysqlclient.dylib will tell you >> what it is) >> >> Fred > > I did this, and my libmysqlclient.dylib was i386 -- but I noticed the > compiler commands were: > > gcc -I. -I. > -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 > -I. -DHAVE_MYSQL_H -I/usr/local/mysql/include -Os -arch i386 > -fno-common -fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c > mysql.c > cc -arch ppc -arch i386 -pipe -bundle -undefined dynamic_lookup -o > mysql.bundle mysql.o -L"." > -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. > -arch ppc -arch i386 -lruby -L/usr/local/mysql/lib -lmysqlclient -lz > -lm -lpthread -ldl -lm > #output: > ld warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of > required architecture > > I copy / pasted the commands stripping out all the '-arch ppc' > instances, and everything worked great for me after that. -- Posted via http://www.ruby-forum.com/.