使用 Bundler 在开发中引用多个本地 ruby gem
我目前正在开发一个由许多 gem 组成的应用程序。这些宝石中的每一个都是同时开发的,对我们来说参考每个宝石当前的本地副本非常重要。
我们目前在每个 gem 中都使用 Bundler。目前我们正在设置一个环境变量,告诉 Bundler 引用我们的本地副本而不是系统安装的 gem。
虽然这有效,但很混乱,因为:
1)当我们来回翻转时,Gemfile.lock 不断变化。这会导致部署时出现错误。 2)这依赖于所有开发人员保持其目录结构完全相同,除非我们也将其配置为可配置(糟糕)。
在这种情况下其他人会做什么?
I currently work on an application that consists of many gems. Each of these gems are being developed at the same time, and it is important for us to reference our current local copy from each of the gems.
We currently use Bundler in each of these gems. Currently we are setting an environment variable that tells Bundler to reference our local copies as opposed to the system installed gem.
While this works, it is messy because:
1) The Gemfile.lock is constantly changing when we flip back and forth. This results in errors when deploying.
2) This relies on all developers keeping their directory structures exactly same, unless we also make this configurable (sucky).
What do other people do in this situation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
例如,将您的 gems 上传到 github 中的私人存储库,然后让 Bundler 从它们中获取数据。您的 gem 开发人员应该更新他们的存储库。
Upload your gems to private repositores in github, for example, and let Bundler feed from them. Your gem developers should have their repos updated.