我剛剛開始使用ruby on rails,並且仍然忙於將所有設置都運行起來..我遇到的問題是它一直說mysql2不是bundle的一部分..我有了明顯GOOGLE了它,但解決方案似乎沒有工作無法在rails上創建ruby數據庫
sudo gem install mysql2
等。
的東西,我得到的是
$耙分貝:創建 耙中止! 請安裝mysql2適配器:
gem install activerecord-mysql2-adapter
(mysql2不是該軟件包的一部分,將它添加到Gemfile中。) /Library/Ruby/Gems/1.8/gems/bundler-1.3.2/lib/bundler/rubygems_integration.rb:214 :gem' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/mysql2_adapter.rb:3 /Library/Ruby/Gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in
要求' /Library/Ruby/Gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inrequire' /Library/Ruby/Gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in
load_dependency' /Library/Ruby/Gems/1.8/gems/activesupport -3.2.12/lib/active_support/dependencies.rb:251:在require' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in
resolve_hash_connection' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:29 :spec' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in
establish_connection' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:90:increate_database' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:62 /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:62:in
each' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:62 任務:TOP => db:create (請參閱完整跟蹤--trace)
任何人都知道我的解決方案嗎? (PS我看到很多人說,它已被添加到創業板上市的配置,但是怎麼樣?)
閱讀錯誤頁面: 'gem install activerecord-mysql2-adapter' – Zippie 2013-03-07 23:47:03
我確實..但它一直說同樣的錯誤.. – Reshad 2013-03-07 23:49:05