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 1070219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:31:54+00:00 2026-05-16T20:31:54+00:00

I’m attempting to use Mongoid from a plain Ruby script (not via Rails or

  • 0

I’m attempting to use Mongoid from a plain Ruby script (not via Rails or any other framework) and I think I’m running into some version dependency conflicts:

/opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': RubyGem version error: activesupport(3.0.0 not >= 2.2.2, < 3.0.pre) (Gem::LoadError)
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
    from /opt/local/lib/ruby/gems/1.8/gems/mongoid-1.9.1/lib/mongoid.rb:24
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from ./rubymongo.rb:4

My local Rails has been upgraded to 3.0.0 already, and if I read the error correctly, somewhere there’s a requirement saying activesupport has to be < 3.0.pre, and 3.0.0 is too new?

Is this because Rails 3.0 is brand new and maybe Mongoid has a config option somewhere with 3.0.pre defined that I need to upgrade? Where would I do that?

I used to have the old Rails still installed too, but got a different error:

/opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:233:in `activate': can't activate activesupport (>= 2.2.2, < 3.0.pre, runtime) for [], already activated activesupport-3.0.0 for ["mongoid-1.9.1"] (Gem::LoadError)
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
    from /opt/local/lib/ruby/gems/1.8/gems/mongoid-1.9.1/lib/mongoid.rb:24
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from ./rubymongo.rb:4

If I go back to having an older activesupport installed, how do I make sure the newer one isn’t being hit as well?

I’m still very new to Ruby, so please elaborate in your answer.

After upgrading to the Mongoid 2.0 beta per Simon’s suggestion, I’m getting a new conflict about bson being too new:

/opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:233:in `activate': can't activate bson (= 1.0.4, runtime) for ["mongoid-2.0.0.beta.17"], already activated bson-1.0.7 for ["mongo-1.0.7", "mongoid-2.0.0.beta.17"] (Gem::LoadError)
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:in `require'
    from ./rubymongo.rb:4

Why is bson 1.0.4 already loaded? Is something else trying to load it explicitly? All my simple .rb script requires is rubygems and mongoid at this point.

Here’s all the gems I use that sound relevant:

actionpack (3.0.0, 2.3.8)
activemodel (3.0.0)
activerecord (3.0.0)
activeresource (3.0.0)
activesupport (3.0.0)
bson (1.0.7, 1.0.4)
bson_ext (1.0.7)
mongo (1.0.8, 1.0.7)
mongo_ext (0.19.3)
mongoid (2.0.0.beta.17)
rails (3.0.0, 2.3.8)
  • 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-05-16T20:31:54+00:00Added an answer on May 16, 2026 at 8:31 pm

    I think I came across the same problem. It does seem to be caused by a dependency clash. mongo 1.0.8 will pull in bson 1.0.7 but mongoid depends on bson 1.0.4 which leads to the clash. I think it all comes down to the very specific dependencies that the mongoid beta has.

    I managed to get this combination of gems working together:

    activemodel (3.0.0)
    activesupport (3.0.0)
    rails (3.0.0)
    mongo (1.0.7)
    mongoid (2.0.0.beta.18)
    bson (1.0.4)
    

    This meant that I had to explicitly install mongo 1.0.7 and bson 1.0.4 and uninstall the latest versions (mongo 1.0.8 and bson 1.0.7). I was then able to run a simple script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a bunch of posts stored in text files formatted in yaml/textile (from
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.