我有一个部署在Heroku上的生产应用 - productionapp.heroku.com
于是,我按照步骤为它创建了一个暂存应用:
1. heroku create stagingapp --remote staging
2. heroku config:add RACK_ENV=staging --app stagingapp
3. heroku addons:add mongohq:free --app stagingapp
4. In config/mongoid.yml -
add
staging:
uri: <%= ENV['MONGOHQ_URL'] %>
5. cp config/environments/production.rb config/environments/staging.rb
6. Add the MONGOHQ_URL in the mongohq.com connection.
6. git push staging master
暂存应用程序一直崩溃,并显示以下回溯信息:
2011-11-21T17:43:23+00:00 app[web.1]:
You did not specify how you would like Rails to report deprecation notices for your staging environment,
please set config.active_support.deprecation to :log, :notify or :stderr at config/environment
2011-11-21T17:43:24+00:00 app[web.1]:
/app/.bundle/gems/ruby/1.9.1/gems/mongoid-2.3.3/lib/mongoid/railtie.rb:64:in `block in <class:Railtie>':
undefined method `values' for nil:NilClass (NoMethodError)
2011-11-21T17:43:24+00:00 app[web.1]:
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
2011-11-21T17:43:24+00:00 app[web.1]:
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
2011-11-21T17:43:24+00:00 app[web.1]:
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initialize
我已经尝试了多次这些步骤,但每次都遇到同样的错误。如果你能帮我解决问题就太好了!