如何使用 :path 和 :branch 添加 gem 依赖项

发布于 2024-09-28 08:16:42 字数 185 浏览 0 评论 0原文

我正在开发一个 Rails gem,它依赖于以下

gem 'authlogic', :git =>; 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3'

如何将其作为依赖项添加到 gem 规范中?具体来说,我需要在依赖项中指定路径和分支。

I am working on a rails gem that has dependency on the following

gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3'

How can I add this in the gem spec as a dependency? Specifically I need to specifiy the path and branch in the dependency.

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

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

发布评论

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

评论(2

翻了热茶 2024-10-05 08:16:42

那么你肯定想使用 Bundler。您可以将您所拥有的内容准确地放入 Gemfile 文件中。请查看我在下面留下的 Bundler 链接。

-- 较旧的信息 --

对于珠宝商,您可以添加如下内容:

gem.add_dependency 'authlogic', '> 1.0', '<= 2.0'

但使用 Bundler 可能会更好。它不仅仅适用于 Rails:http://gembundler.com/

You definitely want to use Bundler then. You would put exactly what you have into the Gemfile file. Go checkout the link to Bundler I left below.

-- older info --

For jeweler you would add something like this:

gem.add_dependency 'authlogic', '> 1.0', '<= 2.0'

But you might be better off using Bundler. It's not just for rails: http://gembundler.com/

后eg是否自 2024-10-05 08:16:42

您需要生成宝石。发布它并在使用此 gem 后进行部署。

You need generate the gem. Publish it and after use this gem deploy.

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