0

我正在运行命令“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: **

我已经查看了有关此问题的所有其他问题,其中一个问题是他在“适配器:sqlserver”这样的适配器和另一个他有服务器的自定义名称(如“Listing_production”)之间没有空格,但没有解释它。这在开发中工作正常,但在生产中不起作用。请帮忙!

4

1 回答 1

3

我认为这-e=是令人困惑的 Rails。试试这个:rails s -e production

于 2013-03-29T15:25:12.527 回答