Rails 3,MongoId& bson版本的问题

时间:2010-08-30 08:16:54

标签: ruby-on-rails-3 mongoid bson

我刚刚更新到Rails 3决赛。现在我遇到MongoId的问题,Mongo的Ruby驱动程序& BSON。当我尝试运行Rails时,我得到“你已经激活了bson 1.0.7,但你的Gemfile需要bson 1.0.4。考虑使用bundle exec。(Gem :: LoadError)”。

MongoId需要bson_ext 1.0.4所以我的Gemfile中有宝石“bson_ext”,“1.0.4”。我试图卸载bson 1.0.7但是Rails无法启动,因为Mongo Ruby驱动程序需要bson> = 1.0.5。

所以我有什么想法可以解决这个问题?

1 个答案:

答案 0 :(得分:1)

这种组合对我有用:

gem 'rails',     '3.0.6'
gem "mongoid",   "2.0.0"
gem "bson",      "1.2.4"
gem "bson_ext",  "1.2.4"

gem "devise" ,   "1.1.6"