Mongoid 3 + Heroku (MongoHQ) cause Moped::Errors::OperationFailure

后端 未结 3 508
北恋
北恋 2021-01-31 08:32

With Rails 3, after upgrading from Mongoid 2.x to Mongoid 3.x, my Heroku + MongoHQ setup stopped working. Funny thing is, that my development & test frameworks and my whole

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 08:55

    You will need to use Ruby 1.9.3. See Mongoid documentation here and Heroku documentation here on how to use 1.9.3.

    I was also getting similar errors, and I changed my gemfile to include ruby '1.9.3' and everything worked as expected again.

    Edit: @herb pointed out that you need the latest version of bundler for this to work (gem install bundler --pre). Otherwise, ruby '1.9.3' in your Gemfile will not work.

提交回复
热议问题