Bundler-加载多个Gemfile [英] Bundler - load multiple Gemfiles

查看:57
本文介绍了Bundler-加载多个Gemfile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是好奇是否有一种简便的方法可以从Ruby应用程序中加载多个Gemfile。

Just curious if there is an easy way to load more than one Gemfile from a Ruby application.

如果您(非常明智地)想知道为什么我会这样做如此疯狂的事情...

If you're (quite sensibly) wondering why I would do such a crazy thing...

这种情况是,我有一台主服务器(有其自己的要求),在实施中可以从任意数量的模块中加载模块系统上的其他路径,以及每个路径,现在,都有该模块使用的gem的自己的Gemfile。

The situation is that I have one master server (that has its own requirements) that may, in implementation, load modules from any number of other paths on the systems, and each path, right now, has its own Gemfile for the gems used by that module.

现在,我通过编辑服务器的Gemfile包含了任何模块使用的所有gems,这似乎可以正常工作,但是绝对不够优雅。

Right now I am getting by by editing the server's Gemfile to include all of the gems used by any of the modules, and that seems to be working, but it's definitely inelegant.

推荐答案

Gemfile是 Ruby。如果要...,您可以搜索所需的任何其他Gemfile并将其包括在内。

A Gemfile is "just Ruby". You can search for any other Gemfiles needed and include them, if you want to...

更新:请参见 http://madebynathan.com/2010/10/19/how-to-use-bundler-with -plugins-extensions /

这篇关于Bundler-加载多个Gemfile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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