Hello All,
I had been trying to work on Rails 4 and Mongoid gem.
The following are the versions I had installed:
bson-2.2.1
mongoid-3.1.6
After installing and trying to run "rails generate" command. It is
failing
with NameSpace error for BSON::ByteBuffer.
It is trying to connect to mongodb server initially and getting successful.
Post that it is failing with the following error
>rails generate
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/cursor.rb:585:in
`construct_query_message': uninitialized constant BSON::ByteBuffer
(NameError)
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/cursor.rb:497:in
`block in send_initial_query'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/logging.rb:55:in
`block in instrument'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/logging.rb:20:in
`instrument'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/logging.rb:54:in
`instrument'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/cursor.rb:495:in
`send_initial_query'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/cursor.rb:480:in
`refresh'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/cursor.rb:126:in
`next'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/db.rb:564:in
`command'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:585:in
`block in check_is_master'
from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:584:in
`check_is_master'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:468:in
`connect'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:693:in
`setup'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:155:in
`initialize'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/legacy.rb:52:in
`initialize'
from C:/MyWork/CopperHundi/config/initializers/mongo.rb:3:in `new'
from C:/MyWork/CopperHundi/config/initializers/mongo.rb:3:in `<top
(required)>'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/engine.rb:609:in
`block (2 levels) in <class:Engine>'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/engine.rb:608:in
`each'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/engine.rb:608:in
`block in <class:Engine>'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:30:in
`instance_exec'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:30:in
`run'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:55:in
`block in run_initializers'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in
each_strongly_connected_component'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:210:in `block (2 levels) in
each_strongly_connected_component_from'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:219:in
`each_strongly_connected_component_from'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:209:in `block in
each_strongly_connected_component_from'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:44:in
`each'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:44:in
`tsort_each_child'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:203:in
`each_strongly_connected_component_from'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:182:in `block in
each_strongly_connected_component'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:180:in `each'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:180:in
`each_strongly_connected_component'
from C:/Ruby193/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:54:in
`run_initializers'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application.rb:215:in
`initialize!'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in
`method_missing'
from C:/MyWork/CopperHundi/config/environment.rb:5:in `<top
(required)>'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application.rb:189:in
`require'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application.rb:189:in
`require_environment!'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands.rb:44:in
`<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I tried referring to few articles on namespace, checked to see if loading
problem and scope of the bson getting loaded.
Any further help on how to debug this issue would help me proceed further.
Thank you
Best Wishes,
Saideep Annadatha
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/CABYqH5hOmTa%2BS3SA6f2wxP5%3DKN4f%2B7Oy%3DbYYpaJ59yiqDcN94g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.