我刚刚开始在 Rails 上运行 ruby,我仍在忙于设置一切运行.. 我遇到的问题是它一直说 mysql2 不是捆绑包的一部分.. 我已经用谷歌搜索了它,但解决方案没有似乎工作
sudo gem install mysql2
ETC..
我得到的东西是
$ rake db:create rake 中止!请安装 mysql2 适配器:
gem install activerecord-mysql2-adapter
(mysql2 不是捆绑包的一部分。将其添加到 Gemfile。) /Library/Ruby/Gems/1.8/gems/bundler-1.3.2/lib/bundler/rubygems_integration.rb:214:ingem' /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:inrequire' /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:inestablish_connectionspec' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in
'/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
每个'/Library/Ruby/Gems/1.8/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:62 任务:TOP => db:create(通过使用 --trace 运行任务查看完整跟踪)
这里有人知道我的解决方案吗?( ps 我看到很多人说它必须添加到 gem 配置中,但是如何?)