问题
While using the foreman
gem I'm having some issues where it will not allow me to define a custom template.
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.
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.
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)?
回答1:
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
And not a file itself.
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."
来源:https://stackoverflow.com/questions/11806682/how-to-define-custom-templates-with-foremans-template-option