Note that there are some explanatory texts on larger screens.

plurals
  1. POMongoid/activesupport version problem
    primarykey
    data
    text
    <p>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:</p> <pre><code>/opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': RubyGem version error: activesupport(3.0.0 not &gt;= 2.2.2, &lt; 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 </code></pre> <p>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 &lt; 3.0.pre, and 3.0.0 is too new?</p> <p>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?</p> <p>I used to have the old Rails still installed too, but got a different error:</p> <pre><code>/opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:233:in `activate': can't activate activesupport (&gt;= 2.2.2, &lt; 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 </code></pre> <p>If I go back to having an older activesupport installed, how do I make sure the newer one isn't being hit as well?</p> <p>I'm still very new to Ruby, so please elaborate in your answer.</p> <p>After upgrading to the Mongoid 2.0 beta per Simon's suggestion, I'm getting a new conflict about bson being too new:</p> <pre><code>/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 </code></pre> <p>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.</p> <p>Here's all the gems I use that sound relevant:</p> <pre><code>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) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload