Я пытаюсь установить mysql gem v. 2.7 на MacOsX Snow Leopard.Я знаю, что об этом много написано, и я прочитал большую часть.
Если я сделаю следующее:
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -v '2.7' -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Я получу:
ERROR: While executing gem ... (TypeError)
can't dup NilClass
Вместо этого попытка установить v 2.8 работает нормально:
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1...
Installing RDoc documentation for mysql-2.8.1...
Но при попытке запустить локальный сервер я получаю эту ошибку:
=> Booting WEBrick
=> Rails 2.3.6 application starting on http://0.0.0.0:3000
/Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activesupport-2.3.6/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant MysqlCompat::MysqlRes (NameError)
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activesupport-2.3.6/lib/active_support/dependencies.rb:80:in `const_missing'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/mysql_adapter.rb:9:in `define_all_hashes_method!'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/mysql_adapter.rb:68:in `mysql_connection'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/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 /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activerecord-2.3.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
from /Users/phishman/Sites/BlindDog/vendor/plugins/admin_data/lib/admin_data/settings.rb:65:in `initialize_defaults'
from /Users/phishman/Sites/BlindDog/vendor/plugins/admin_data/init.rb:36:in `evaluate_init_rb'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/rails/plugin.rb:158:in `evaluate_init_rb'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activesupport-2.3.6/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/rails/plugin.rb:154:in `evaluate_init_rb'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/rails/plugin.rb:48:in `load'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/rails/plugin/loader.rb:38:in `load_plugins'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/rails/plugin/loader.rb:37:in `each'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/rails/plugin/loader.rb:37:in `load_plugins'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/initializer.rb:369:in `load_plugins'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/initializer.rb:165:in `process'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/initializer.rb:113:in `send'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/initializer.rb:113:in `run'
from /Users/phishman/Sites/BlindDog/config/environment.rb:9
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activesupport-2.3.6/lib/active_support/dependencies.rb:156:in `require'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activesupport-2.3.6/lib/active_support/dependencies.rb:156:in `require'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activesupport-2.3.6/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/activesupport-2.3.6/lib/active_support/dependencies.rb:156:in `require'
from /Users/phishman/Sites/BlindDog/vendor/ruby/1.8/gems/rails-2.3.6/lib/commands/server.rb:84
from script/server:3:in `require'
from script/server:3
Можете ли вы мне помочь?Пожалуйста, я ломал голову над этим в течение 2 дней :( MySQL, который я использую, это dmg, скачанный с mysql.com. Я даже пытался удалить его и установить mysql из macports, но получал много ошибок, поэтому у меня былопереустановить с mysql.com