1

我已将我的配置升级到 RoR 1.9.3 并且无法再让它在 Heroku 中工作。

config/mongoid.yml内容:

production:
  sessions:
    default:
      uri: <%= ENV['MONGOHQ_URL'] %>
    options:
      skip_version_check: true
      safe: true

错误:

2012-09-19T16:50:39+00:00 app[web.1]: Mongoid::Errors::NoSessionsConfig (
2012-09-19T16:50:39+00:00 app[web.1]: Problem:
2012-09-19T16:50:39+00:00 app[web.1]:   No sessions configuration provided.
2012-09-19T16:50:39+00:00 app[web.1]: Summary:
2012-09-19T16:50:39+00:00 app[web.1]:   Mongoid's configuration requires that you provide details about each session that can be connected to, and requires in the sessions config at least 1 default session to exist.
2012-09-19T16:50:39+00:00 app[web.1]: Resolution:
2012-09-19T16:50:39+00:00 app[web.1]:   Double check your mongoid.yml to make sure that you have a top-level sessions key with at least 1 default session configuration for it. You can regenerate a new mongoid.yml for assistance via `rails g mongoid:config`.

有人知道我在做什么错吗?

4

1 回答 1

2

我的缩进是错误的,这是固定版本:

production:
  sessions:
    default:
      uri: <%= ENV['MONGOHQ_URL'] %>
      options:
        skip_version_check: true
        safe: true
于 2012-09-19T19:09:56.340 回答