English 中文(简体)
Mongoid/active edition problem
原标题:Mongoid/activesupport version problem

I m 试图使用Mongoid(不是通过铁路或任何其他框架)的便衣,我认为Im会陷入一些形式的依赖冲突:

/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

我的当地铁路已经升级为3.0,如果我正确阅读错误的话,有些地方要求必须提供积极支持;3.0.pre和3.0.0太新?

这是否是因为铁路3.0是新的品牌,也许Mongoid在某个地方拥有一个有3.0的组合选择。 我怎么做?

我过去还安装了旧铁路,但出现不同的错误:

/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

如果我回到安装了旧的现役支助设施,我如何确保新来的 t也受到打击?

我对Rub仍然很新,请在你的答复中阐述。

在向Mongoid 2.0 beta升级后,Im正在经历一场新的冲突,认为 b子太新:

/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

为什么已经装满1.0.4 son? 还有一点试图明确装上它? 我所有简单的手稿都需要的是废墟和ongo。

在座各位,我使用的是这一合理的:

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)
最佳回答

我认为我也遇到了同样的问题。 这似乎是由依赖性冲突造成的。 mongo 1.0.8将 in1.0.7,但mongoid依靠son1.0.4引发冲突。 我认为,所有这些都取决于县长的县。

我设法使这些宝石合在一起:

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)

这意味着,我必须明确安装1.0.7和bson 1.0.4,并放弃最新版本(mongo 1.0.8和bson 1.0.7)。 然后,我能够操作简单的文字。

问题回答

确实发生了Gem版本的冲突。

There are two versions of mongoid available right now: * 1.9.1 stable * 2.0.0 beta

Both should work well with Rails 3. Even mongoid 1.9.1, which is a little bit more old, depends on activesupport <= 3.0.0 which means Rails 3 is a valid dependency. Perhaps, you re still working with Rails 3 RC.

我建议你:

  1. 保证您改变其Gemfile,以使用铁路3号,重新制作你的Gemfile。 锁定并重整附属公司

    gem "rails", 3.0.0"
    
    $ bundle update
    $ bundle install
    
  2. 如果问题持续存在,将努力升级至2.0.0 beta。





相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

热门标签