Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8451095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:08:43+00:00 2026-06-10T11:08:43+00:00

I have an error that appears to be connected to these two links: https://groups.google.com/forum/#!msg/mongoid/L6ESKP8QDpg/gmEyqejdAEEJ

  • 0

I have an error that appears to be connected to these two links:

  • https://groups.google.com/forum/#!msg/mongoid/L6ESKP8QDpg/gmEyqejdAEEJ
  • https://github.com/mongoid/moped/pull/59

See console log below. I am running with Mongoid/MongoHQ, when I create an object (apparently any database object) I get this “need to login” error. Note however that the database object IS created and is in the database after the error.

Is there some way I can fix this myself, or perhaps it’s something that MongoHQ needs to fix?

$ heroku run console
irb(main):004:0> Request.create!(:from_user => User.first, :to_user => User.first)
Moped::Errors::OperationFailure: The operation: #<Moped::Protocol::Command
  @length=69
  @request_id=7
  @response_to=0
  @op_code=2004
  @flags=[]
  @full_collection_name="admin.$cmd"
  @skip=0
  @limit=-1
  @selector={:getlasterror=>1, :safe=>true}
  @fields=nil>
failed with error "need to login"
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:74:in `block in command'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:521:in `[]'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:521:in `block (3 levels) in flush'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:520:in `map'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:520:in `block (2 levels) in flush'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:123:in `ensure_connected'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:516:in `block in flush'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:531:in `logging'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:515:in `flush'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:286:in `pipeline'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/session/context.rb:58:in `block in insert'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/session/context.rb:109:in `block in with_node'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/cluster.rb:150:in `block in with_primary'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/node.rb:168:in `ensure_primary'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/cluster.rb:149:in `with_primary'
    from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.2.0/lib/moped/session/context.rb:108:in `with_node'
... 13 levels...
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
    from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.4/lib/mongoid/callbacks.rb:100:in `run_callbacks'
    from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.4/lib/mongoid/persistence/insertion.rb:23:in `prepare'
    from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.4/lib/mongoid/persistence/operations/insert.rb:26:in `persist'
    from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.4/lib/mongoid/persistence.rb:50:in `insert'
    from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.4/lib/mongoid/persistence.rb:251:in `block in create!'
    from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.4/lib/mongoid/threaded/lifecycle.rb:173:in `_creating'
    from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.4/lib/mongoid/persistence.rb:249:in `create!'
    from (irb):4
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'irb(main):005:0> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:08:44+00:00Added an answer on June 10, 2026 at 11:08 am

    It turns out the problem is that MongoHQ upgraded their MongoDB and it introduced an incompatibility with mongoid’s stable branch.

    Chris Winslett fixed the bug and durran pulled it into mongoid master. But it was not included in the stable branch when I posted this stackoverflow.

    Solutions:

    • I solved the problem by updating my gemfile to pull mongoid from github.
    • durran has now included it in stable-1.2.0 so you should get the fix if you gem update.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an error that I can't solve... I correctly registered as an Apple
I have this error that is keeping me from moving forward. I basically have
I have an odd error that you guys will hopefully be able to help
I have a silly error that I am unable to resolve. I try to
I have a javascript error that occurs on my site, Im pretty sure I
I have a syntax error that I don't know how to fix. This is
Today, I have made an error that frustrated me for hours to see what
I have a WCF error handler that uses the IErrorHandler interface. In the HandleError
I have to debug some error that is db related and have been continuously
I have a really frustrating error that I've spent hours looking at and cannot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.