MongoMapper 和联合插件出现问题

发布于 2024-12-16 17:58:08 字数 351 浏览 2 评论 0原文

我在 Ruby 1.9.2 中使用 mongo_mapper (0.10.1, 0.9.2) 和 joint (0.6.0, 0.4) ,每当我尝试将“插件 Joint”添加到我的模型之一时,我都会收到错误。具体来说:

ArgumentError: Plugins must extend ActiveSupport::Concern
from /.rvm/gems/ruby-1.9.2-p290/gems/mongo_mapper 0.10.1/lib/mongo_mapper/plugins.rb:11:in `plugin'

我将 join 添加到了 gem 文件中,但我很难确定这个错误。任何帮助将不胜感激。

I am using mongo_mapper (0.10.1, 0.9.2) and joint (0.6.0, 0.4) in Ruby 1.9.2 and when ever I try to add the "plugin Joint" to one of my models I get an error. Specifically:

ArgumentError: Plugins must extend ActiveSupport::Concern
from /.rvm/gems/ruby-1.9.2-p290/gems/mongo_mapper 0.10.1/lib/mongo_mapper/plugins.rb:11:in `plugin'

I added joint to my gem file and I am just having a hard time pinning down this error. Any help would be appreciated.

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

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

发布评论

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

评论(1

乖乖哒 2024-12-23 17:58:08

问题在于该版本的 Joint 中存在依赖性问题。解决该问题的方法是要求 git 中的 gem 获取最新版本,该版本具有 mongomapper 0.10.1 的依赖修复,因为其他关节仅支持 0.9.x 版本

gem 'joint', :git => "git://github.com/jnunemaker/joint.git"

The problem was with dependency issues in that version of Joint. The remedy to the problem was to require the gem from the git to get the latest version which had a dependcy fix for mongomapper 0.10.1 because the other Joint only supported up through 0.9.x

gem 'joint', :git => "git://github.com/jnunemaker/joint.git"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文