pact-foundation / pact-ruby

Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://pact.io
MIT License
2.17k stars 216 forks source link

Pact No such file or directory publish_dir #305

Open kheraankit opened 9 months ago

kheraankit commented 9 months ago

I am getting this error when trying to run provider verification tests. It wants to create a directory under root /publish/ for which it doesn't have permissions. Is there any configuration property that I can use to configure the path, and learn more about what it is trying to do?

  Failure/Error: file = File.new("#{@publish_dir}/#{filename}", 'w+')

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - /publish/0.2795377757053914
     # /Users/<user>/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/pact-1.64.0/bin/pact:4:in `<top (required)>'
     # /Users/<user>/.rbenv/versions/3.0.5/bin/pact:25:in `load'
     # /Users/<user>/.rbenv/versions/3.0.5/bin/pact:25:in `<top (required)>'
YOU54F commented 3 months ago

Are you able to provide any more information about your setup? or provide a minimal reproducible example?