mongoid3

Unicorn triggers mongoid error during assets precompile

邮差的信 提交于 2019-11-29 06:20:53
I have a rails app using Mongoid 3 running on Heroku. I've just updated it to use Unicorn. When I try to deploy it to Heroku I get the following error : Running: rake assets:precompile rake aborted! undefined method `match' for nil:NilClass /tmp/build_3nnbzpfmnjpns/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.21/lib/mongoid/sessions/mongo_uri.rb:49:in `initialize' The full stacktrace can be found at http://pastebin.com/8YcJHEmS But if I remove Unicorn from my Gemfile, the assets compilation succeeds. Looking into the Mongoid code, I can see that the error happens when the mongoid.yml file is