如何使用 :path 和 :branch 添加 gem 依赖项
我正在开发一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
那么你肯定想使用 Bundler。您可以将您所拥有的内容准确地放入 Gemfile 文件中。请查看我在下面留下的 Bundler 链接。
-- 较旧的信息 --
对于珠宝商,您可以添加如下内容:
但使用 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:
But you might be better off using Bundler. It's not just for rails: http://gembundler.com/
您需要生成宝石。发布它并在使用此 gem 后进行部署。
You need generate the gem. Publish it and after use this gem deploy.