相关疑难解决方法(0)

ActiveRecord :: AdapterNotSpecified数据库配置未指定适配器

当我使用heroku打开我的网络应用程序工作正常,但当我使用rails(localhost)时,我遇到了这个错误:

ActiveRecord::AdapterNotSpecified database configuration does not specify adapter
Run Code Online (Sandbox Code Playgroud)

为什么是这样?

这是我的database.yml

# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
#   gem install pg
# On OS X with Homebrew:
#   gem install pg -- --with-pg-config=/usr/local/bin/pg_config
# On OS X with MacPorts:
#   gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
#   gem install pg
#       Choose the win32 build.
#       Install PostgreSQL and put its /bin directory on your path.
#
# Configure Using Gemfile …
Run Code Online (Sandbox Code Playgroud)

ruby postgresql activerecord heroku ruby-on-rails-4

31
推荐指数
3
解决办法
6万
查看次数

标签 统计

activerecord ×1

heroku ×1

postgresql ×1

ruby ×1

ruby-on-rails-4 ×1