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