我已将配置升级到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`.
任何人都知道我做错了什么?
答案 0 :(得分:2)
我的缩进是错误的,这是固定版本:
production:
sessions:
default:
uri: <%= ENV['MONGOHQ_URL'] %>
options:
skip_version_check: true
safe: true