Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Mercurial as provider: undefined method `path' for Chef::Resource::DeployRevision #19

Open
hlogmans opened this issue May 2, 2015 · 0 comments

Comments

@hlogmans
Copy link

hlogmans commented May 2, 2015

Hi all,

using this cookbook for a manual Mercurial sync works fine. But when using as a provider for application_ruby, I get below error. I did some searching and trying, but my best guess this repo is just out-of-date with current chef-versions or at least the application cookbook. With over one million downloads for this two-year old version alone, there is definitely a need for up-to-date mercurial support :) Or I do just something wrong and those 999.999 users did it right the first time ;-)

In my application_ruby definition, I do set the path. But in the compiled sources this is replaced by 'deploy_to', and there is no path for the deploy_revision.

I did browse through the pull-requests and forks, but could not find a solution to this problem, maybe I overlooked it? I tried to find the corresponding code for the git version (which works fine) to update the code, but is that available in a public repository?

 ================================================================================
10.211.55.10     Error executing action `deploy` on resource 'deploy_revision[test_app]'
10.211.55.10     ================================================================================
10.211.55.10     
10.211.55.10     NoMethodError
10.211.55.10     -------------
10.211.55.10     undefined method `path' for Chef::Resource::DeployRevision
10.211.55.10     
10.211.55.10     Cookbook Trace:
10.211.55.10     ---------------
10.211.55.10     /var/chef/cache/cookbooks/mercurial/providers/default.rb:100:in `tmp_directory'
10.211.55.10     /var/chef/cache/cookbooks/mercurial/providers/default.rb:91:in `init'
10.211.55.10     /var/chef/cache/cookbooks/mercurial/providers/default.rb:67:in `load_current_resource'
10.211.55.10     
10.211.55.10     Resource Declaration:
10.211.55.10     ---------------------
10.211.55.10     # In /var/chef/cache/cookbooks/application/providers/default.rb


def tmp_directory
  ::File.join(Chef::Config[:file_cache_path], "mercurial", sanitize_filename(new_resource.path))
end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant