Reputation: 8531
In my Rails 3.0.10 app, with Mongoid 2.2.2, I'm getting this error in production (works fine in development):
.../gems/mongo-1.3.1/lib/mongo/util/support.rb:50:in `validate_db_name': db_name must be a string or symbol (TypeError)
I've added this to my environment.rb:
require 'yaml'
YAML::ENGINE.yamler = 'syck'
Also, I've removed the defaults <<
lines from my mongoid.yml file and replaced them with the defaults.
When I use mongoid-2.2.6, the app starts, but I get the same error when I query the db.
What am I overlooking?
Needed to specify 'localhost' for the host rather than <%= ENV['MONGOID_HOST'] %>
, and also specified the database:
name.
Upvotes: 2
Views: 2264
Reputation: 8531
Needed to specify 'localhost' for the host rather than <%= ENV['MONGOID_HOST'] %>, and also specified the database: name.
Upvotes: 1