如何使用已在 Github 上发布但尚未在 Rubygems 上发布的 gem 版本?

发布于 2024-12-01 09:20:25 字数 584 浏览 0 评论 0原文

我正在尝试在我的 Sinatra 应用程序中安装和使用 datamapper gem。我遇到了一个问题,datamapper gem 所依赖的 gem 版本存在错误:dm-do-adapter gem。

我不太确定如何解决这个问题。看起来该错误已在 gem 的 master 分支中修复,但尚未标记。所以我的 Gemfile 目前看起来像这样:

source 'http://rubygems.org'
gem 'sinatra'
gem 'datamapper'
gem 'dm-do-adapter', :git => 'git://github.com/datamapper/dm-do-adapter.git'

但是,它似乎不起作用。尝试捆绑更新后,我收到此消息:

Could not find gem 'dm-core (~> 1.1.1)', required by 'dm-do-adapter', in any of the sources

解决此问题的最佳方法是什么?

I am trying to install, and use, the datamapper gem in my Sinatra application. I am running into an issue where there is a bug in a version of a gem that the datamapper gem depends on: the dm-do-adapter gem.

I'm not exactly sure how to solve this issue. It looks like the bug has been fixed in the master branch of the gem, but hasn't been tagged yet. So my Gemfile currently looks like this:

source 'http://rubygems.org'
gem 'sinatra'
gem 'datamapper'
gem 'dm-do-adapter', :git => 'git://github.com/datamapper/dm-do-adapter.git'

However, it doesn't seem to work. After trying bundle update, I get this message:

Could not find gem 'dm-core (~> 1.1.1)', required by 'dm-do-adapter', in any of the sources

What is the best way to get around this problem?

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

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

发布评论

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

评论(1

孤君无依 2024-12-08 09:20:25

如果您正在谈论 DataObjects::URI.new with arguments is deprecated 警告,请尝试以下操作:

gem 'dm-do-adapter', 
  git: 'git://github.com/datamapper/dm-do-adapter',
  ref: '7f0b53d1ada8735910e0' 

我刚刚在 Gemfile 中使用上述内容创建了一个新项目,并且运行良好。

If you are talking about the DataObjects::URI.new with arguments is deprecated warning, then try this:

gem 'dm-do-adapter', 
  git: 'git://github.com/datamapper/dm-do-adapter',
  ref: '7f0b53d1ada8735910e0' 

I just made a new project with the above in my Gemfile and it worked fine.

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