mongoid/mongoid — Issue #1528: Mongoid 2.1.x and 2.2.x incompatible with ruby driver 1.5.2
Author: ajsharp
Created: 2011-12-27 21:41:18+00:00
State: open

We've been successfully using mongoid 2.0.x with 1.5.2 of the ruby driver for a while, but when we attempted to upgrade to 2.2.5 we get a stack-level too deep error in the ruby driver as it attempts to configure the connection. Here's the config and backtrace:

```yaml
test:
host: localhost
database: test
autocreate_indexes: true
persist_in_safe_mode: true
connect_timeout: 10
```

```
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/db.rb:505:in `command'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:620:in `block in check_is_master'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:619:in `check_is_master'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:400:in `connect'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:495:in `checkout_writer'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/cursor.rb:524:in `checkout_socket_from_connection'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/cursor.rb:466:in `send_initial_query'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/cursor.rb:458:in `refresh'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/cursor.rb:128:in `next'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/db.rb:505:in `command'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:620:in `block in check_is_master'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:619:in `check_is_master'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:400:in `connect'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:574:in `setup'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:104:in `initialize'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:155:in `new'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongo-1.5.2/lib/mongo/connection.rb:155:in `from_uri'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongoid-2.2.5/lib/mongoid/config/database.rb:89:in `master'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongoid-2.2.5/lib/mongoid/config/database.rb:22:in `configure'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongoid-2.2.5/lib/mongoid/config.rb:316:in `configure_databases'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongoid-2.2.5/lib/mongoid/config.rb:119:in `from_hash'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongoid-2.2.5/lib/mongoid/config.rb:136:in `load!'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongoid-2.2.5/lib/mongoid.rb:145:in `load!'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/mongoid-2.2.5/lib/mongoid/railtie.rb:65:in `block in '
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
from /Users/ajsharp/.rvm/gems/ruby-1.9.2-p180@zaarly-api/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/ajsharp/Projects/ruby/zaarly/api/config/environment.rb:5:in `'
```