将Mongoid更新到3.0.6后无法连接到Heroku中的MongoHQ



我已经将我的配置升级到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`.

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

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

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

最新更新