如何与Bundler一起开发两个宝石? [英] How can I develop two gems together with Bundler?

查看:56
本文介绍了如何与Bundler一起开发两个宝石?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发两个宝石,我们称它们为foo和bar。而且foo对bar具有运行时依赖性。我正在使用bundler开发这两个gem。目前,我唯一能看到的方法是将 gem bar,path: path / to / bar 放入foo的Gemfile中,并将其删除一次栏位于rubygems上,但是该解决方案显然不能令人满意,因为它将在该日期之前在其他任何人的计算机上中断。不清楚依赖项是运行时还是编译时间



您是否尝试使用本地 .gem 文件安装 bar ?一旦安装在 GEM_HOME 中,您的 foo gem应该会检测到它

  cd / path / to / bar 
耙安装

然后

  cd / path / to / foo 
rake build


I am developing two gems, let's call them foo and bar. Also foo has a runtime dependency on bar. I am developing both these gems with bundler.

How can I specify bar as a dependency of foo and have bundler resolve that dependency to a local path, without polluting my Gemfile? At the moment the only way I can see to do this is to put gem "bar", path: "path/to/bar" in foo's Gemfile, and remove it once bar is on rubygems, but this solution is obviously unsatisfactory as it will break on anybody else's machine until that date.

解决方案

It is not clear if the dependency is runtime or compile time.

Have you tried installing bar using the local .gem file? Once installed in GEM_HOME, your foo gem should detect it

cd /path/to/bar
rake install

then

cd /path/to/foo
rake build

这篇关于如何与Bundler一起开发两个宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆