问题描述
在使用 foreman
gem 时,我遇到了一些问题,它不允许我定义自定义模板.
While using the foreman
gem I'm having some issues where it will not allow me to define a custom template.
对于我的一个应用程序,我可以定义 ~/.foreman/templates/upstart/master.conf.erb 并且读取得很好.然而对于另一个项目,无论我尝试什么,我都无法获得模板来正确地唤起 forman upstart export.
For one of my apps I am able to define ~/.foreman/templates/upstart/master.conf.erb and it is read just fine. Yet for another project, no matter what I try, I cannot get a template to evoke properly with forman upstart exportation.
我尝试了许多不同的方法,从使用具有绝对和相对路径的文件定义 -t 和 --template 标志到 ~/.foreman 方法.似乎没有任何效果.
I've attempted many different ways from defining the -t and --template flag with a file with absolute and relative paths to the ~/.foreman approach. Nothing seems to work.
您能否提供一些演示/场景,说明如何使用版本控制目录(例如 config/upstart-master.conf.erb)中的模板定义 -t 标志?
Could you please offer a few demonstrations / scenarios of how the -t flag should be defined with a template in the version controlled directory (such as in config/upstart-master.conf.erb)?
推荐答案
给-t
(或--template
)的参数必须是包含0的目录,1、2 或全部 3 个:
The argument given to -t
(or --template
) must be a directory containing 0, 1, 2 or all 3 of:
master.conf.erb
process_master.conf.erb
process.conf.erb
而不是文件本身.
初始功能拉取请求.拉取请求以改进文档 作为当前文档的唯一状态:指定要使用的备用模板用于创建导出文件."
Initial feature pull request. Pull request to improve docs as the current docs only state: "Specify an alternate template to use for creating export files."
这篇关于如何使用工头的 --template 选项定义自定义模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!