mysql driver giving problem on MAC 32 Bit

HI, I have MAC operating system which is 32 bit. I am facing a problem while installing the mysql driver. I have installed mysql gem with following command:- "sudo env ARCHFLAGS="-arch i386" gem install mysql -v=2.7 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config" It has installed the gem successfully. I can see it in my gem list. Whenever I am trying to start the server I am getting the following error:- !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): no suitable image found. Did find: (LoadError)   /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle   from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/mysql_adapter.rb:61:in `mysql_connection'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'   from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'   from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1295:in `table_exists?'   from /Library/Ruby/Gems/1.8/gems/browsercms-3.1.0/lib/cms/init.rb:35:in `init'   from /Library/Ruby/Gems/1.8/gems/browsercms-3.1.0/rails/init.rb:3:in `evaluate_init_rb'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/rails/plugin.rb:158:in `evaluate_init_rb'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/rails/plugin.rb:154:in `evaluate_init_rb'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/rails/plugin.rb:48:in `load'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/rails/plugin/loader.rb:38:in `load_plugins'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/rails/plugin/loader.rb:37:in `each'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/rails/plugin/loader.rb:37:in `load_plugins'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:369:in `load_plugins'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:165:in `process'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run'   from /railsproject/bcms/browsercms_demo/config/environment.rb:9   from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'   from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'   from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'   from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:84   from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'   from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'   from script/server:3

Can anyone tell me what is fix for this error?

Thanks, Tushar

HI, I have MAC operating system which is 32 bit. I am facing a problem while installing the mysql driver. I have installed mysql gem with following command:- "sudo env ARCHFLAGS="-arch i386" gem install mysql -v=2.7 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config"

What version of mac os x have you got ?

Fred

Hi, I have MAC OS version 10.6.2. Frederick Cheung wrote:

Tushar Gandhi wrote:

Hi, I have MAC OS version 10.6.2.

Isn't that 64-bit?

Best,

Hi, No it's 32-bit OS

10.6.x has (by default on most machines) a 32bit kernel, but apps can be 64bit. In particular the ruby runtime is 64/32bit universal and so will default to 64bit. (you should make sure you have the 64bit version of mysql too)

Fred

I had a really hard time getting the mysql gem to run on snow leopard for me. Try uninstalling mysql and reinstalling it with macports. Here is a post I made about how I got it to run on my machine. http://lupinedev.com/2010/5/24/installing-mysql-gem-on-snow-leopard

Hope this helps...

Hi, How can I found that my ruby application is 32 bit or 64 bit?

My ruby version is as follows:- ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]

Thanks, Tushar

Thanks Guys, I have solved the error by installing the mysql 64 bit version and installing the gem.

Thanks for your suggestions.