nmerouze/machinist_mongo

uninitialized constant MongoMapper::EmbeddedDocument::ClassMethods

Closed this issue · 3 comments

Error while running specs with machinist_mongo being required:

/Users/akhkharu/.rvm/rubies/ruby-1.8.7-p160/bin/ruby /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/rspec-1.3.0/bin/spec --autospec /Users/akhkharu/ror/shortener/spec/shortener_spec.rb -O spec/spec.opts
/Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in load_missing_constant': uninitialized constant MongoMapper::EmbeddedDocument::ClassMethods (NameError) from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:inconst_missing'
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/machinist_mongo-1.1.0/lib/machinist/mongo_mapper.rb:82
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire'
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in new_constants_in' from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire'
from /Users/akhkharu/ror/shortener/spec/blueprints.rb:1
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire'
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in new_constants_in' from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire'
from /Users/akhkharu/ror/shortener/spec/spec_helper.rb:16
from /Users/akhkharu/ror/shortener/spec/shortener_spec.rb:1:in require' from /Users/akhkharu/ror/shortener/spec/shortener_spec.rb:1 from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:15:inload'
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:15:in load_files' from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:14:ineach'
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:14:in load_files' from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/rspec-1.3.0/lib/spec/runner/options.rb:133:inrun_examples'
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/rspec-1.3.0/lib/spec/runner/command_line.rb:9:in `run'
from /Users/akhkharu/.rvm/gems/ruby-1.8.7-p160/gems/rspec-1.3.0/bin/spec:5

The problem has been resolved for me after installing gem from github repo.

It's fixed on 2.0.0.pre but this version is not compatible with Rails 2.x. I will backport the fix on 1.x when I will be back on a Rails 2.x project at work.

I've fixed the issue on 1.x and pushed a new gem with version 1.1.1