From: Luis Lavena Date: 2009-09-04T02:50:11+09:00 Subject: Re: gem install mysql returns list of No definition for XYZ On Sep 3, 8:51 am, Peter Marks wrote: > I got the same error as Joao installing the mysql gem with the following > command: > > sudo gem install mysql — > –with-mysql-config=/usr/local/mysql/bin/mysql_config > > I get an error loading the gem though: > > irb(main):001:0> require 'rubygems' > => true > irb(main):002:0> require 'mysql' > LoadError: Failed to load > /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle >   from /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle >   from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' >   from (irb):2 > > Mysql is running fine and seems to be installed correctly: > > petermarks [23:33] ~ which mysql > /usr/local/mysql/bin/mysql > > petermarks [23:33] ~ file > /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle > /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle: Mach-O > 64-bit bundle x86_64 The problem is that you installed mysql extension using ruby "setup.rb" instead of the gem. Please remove the site_ruby mysql.bundle file and try installing the gem if you do "gem which mysql" you will see that the entry point (the library) is mysql.rb, not mysql.bundle in mysql gem version 2.8.1 -- Luis Lavena