# Mysql driver giving problem on MAC 32 Bit

**URL:** <https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523>\
**Category:** Rails\
**Created:** [June 2, 2010, 1:55pm UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523 "2010-06-02T13:55:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 2, 2010, 1:55pm UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/1 "2010-06-02T13:55:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 2, 2010, 2:24pm UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/2 "2010-06-02T14:24:44Z")

</div>

On Jun 2, 12:55 pm, Tushar G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 2, 2010, 2:41pm UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/3 "2010-06-02T14:41:38Z")

</div>

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

> On Jun 2, 12:55ï¿½pm, Tushar G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > 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

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 2, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/4 "2010-06-02T14:45:49Z")

</div>

Tushar G. wrote:

> Hi,  
> I have MAC OS version 10.6.2.

Isn’t that 64-bit?

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 2, 2010, 3:04pm UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/5 "2010-06-02T15:04:11Z")

</div>

Hi,  
No it’s 32-bit OS

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 2, 2010, 3:39pm UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/6 "2010-06-02T15:39:41Z")

</div>

On Jun 2, 2:04 pm, Tushar G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 2, 2010, 8:18pm UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/7 "2010-06-02T20:18:44Z")

</div>

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](http://lupinedev.com/2010/5/24/installing-mysql-gem-on-snow-leopard)

Hope this helps…

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 3, 2010, 6:10am UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/8 "2010-06-03T06:10:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 3, 2010, 7:46am UTC](https://www.ruby-forum.com/t/mysql-driver-giving-problem-on-mac-32-bit/189523/9 "2010-06-03T07:46:48Z")

</div>

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

Thanks for your suggestions.
