Rails 3、MongoId 和bson版本问题

发布于 2024-09-16 15:38:02 字数 346 浏览 3 评论 0原文

我刚刚更新到 Rails 3 Final。现在我遇到了 MongoId、Mongo 的 Ruby 驱动程序和 MongoId 的问题。布森。当我尝试运行 Rails 时,我收到“您已经激活了 bson 1.0.7,但您的 Gemfile 需要 bson 1.0.4。请考虑使用bundle exec。(Gem::LoadError)”。

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

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

I just updated to Rails 3 final. Now I'm having problems with MongoId, Mongo's Ruby driver & bson. When I try to run Rails, I get "You have already activated bson 1.0.7, but your Gemfile requires bson 1.0.4. Consider using bundle exec. (Gem::LoadError)".

MongoId requires bson_ext 1.0.4 so I have gem "bson_ext", "1.0.4" in my Gemfile. I tried to uninstall bson 1.0.7 but then Rails failed to start because Mongo Ruby driver requires bson >= 1.0.5.

So any ideas how I can get this solved?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情愿 2024-09-23 15:38:06

这个组合对我有用:

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"

this combination works for me:

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"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文