I have my own gem that streamlines deployment for me, as the servers have the some configuration.
The structure is as following:
- .
- ..
- lib
- capistrano
- foo
- common.rb
- foo.rb
foo.rb:
require "capistrano"
require "capistrano/ext/multistage"
require "capistrano/foo/common"
common.rb:
def _cset(name, *args, &block)
unless exists?(name)
set(name, *args, &block)
end
end
def _baz(param)
end
I can’t seem to call _baz in my deploy files, while I am able to call _cset just fine. How can I make _baz callable in my deploy files?
Exception:
capistrano-2.12.0/lib/capistrano/configuration/variables.rb:122:in `method_missing_with_variables’: undefined method `_symlink’ for # (NoMethodError)
This was a
requireproblem,capistrano/foowasn’t properly required in the project itself and I don’t requirecapistrano/foo/commonexplicitly in my base recipes.