gpt4 book ai didi

ruby-on-rails - Capistrano Capfile : what does >load 'deploy' do?

转载 作者:太空宇宙 更新时间:2023-11-03 16:03:27 24 4
gpt4 key购买 nike

运行 capify 后,默认的 Capfile 始终以:

load 'deploy'  

当我 >put $"时,我在我的加载路径上没有看到 deploy.rb 文件,但我假设这加载了 capistrano 附带的默认部署配方?

最佳答案

来自Ruby Standard library documentation for Kernel.load :

load(filename, wrap=false) → true

Loads and executes the Ruby program in the file filename. If the filename does not resolve to an absolute path, the file is searched for in the library directories listed in $:. If the optional wrap parameter is true, the loaded script will be executed under an anonymous module, protecting the calling program’s global namespace. In no circumstance will any local variables in the loaded file be propagated to the loading environment.

load 'deploy' 完全按照您的想象执行,它从 Capistrano 中加载 deploy.rb

关于ruby-on-rails - Capistrano Capfile : what does >load 'deploy' do?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19552699/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com