New Rails 4项目需要安装mysql gem

时间:2013-11-15 06:37:44

标签: mysql ruby-on-rails sqlite

我正在创建一个没有任何rails选项的新-d项目,但是当我在浏览器中打开它时会崩溃:

  

为数据库适配器指定了“mysql”,但未加载gem。将gem 'mysql'添加到您的Gemfile。

在任何项目的任何地方都没有提到mysql适配器(它是一个新项目),database.yml中的适配器是sqlite3。我也试过-d sqlite3,没有运气。跟踪的一些行是:

vendor/bundle/gems/activerecord-4.0.1/lib/active_record/connection_adapters/connection_specification.rb:58:in `rescue in resolve_hash_connection'
vendor/bundle/gems/activerecord-4.0.1/lib/active_record/connection_adapters/connection_specification.rb:55:in `resolve_hash_connection'
vendor/bundle/gems/activerecord-4.0.1/lib/active_record/connection_adapters/connection_specification.rb:46:in `resolve_string_connection'
vendor/bundle/gems/activerecord-4.0.1/lib/active_record/connection_adapters/connection_specification.rb:32:in `spec'
.
.
.
/usr/local/var/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/usr/local/var/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/usr/local/var/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

0 个答案:

没有答案