【发布时间】:2013-03-20 07:47:15
【问题描述】:
我正在运行命令“rails s -e=production”并收到以下错误:
connection_specification.rb:47:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
我的 config/database.yml 的内容:
development:
adapter: sqlserver
host: ***.***.***.***
database: gmi_******
username: **
password: **
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlserver
host: ***.***.***.***
database: gmi_******
username: **
password: **
我已经查看了有关此问题的所有其他问题,其中一个问题是他在“adapter:sqlserver”这样的适配器和另一个他对“Listing_production”这样的服务器有自定义名称的适配器之间没有空格,但是没有考虑到它。这在开发中工作正常,但在生产中不起作用。请帮忙!
【问题讨论】:
-
你的 Gemfile 是什么样的?
标签: ruby-on-rails database ruby-on-rails-3 production-environment