0

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

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

mysql任何项目(它是一个新项目)的任何地方都没有提到适配器,并且适配器database.ymlsqlite3. 我也试过-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'
4

0 回答 0