Hello, I have a problem with pact-cli docker image...
# pact-ruby
c
Hello, I have a problem with pact-cli docker image. I'm not sure to which channel this would belong, so I'm not sure whether I'm positing this in the right channel. I'm trying to send a request to a Pact broker server using the following powershell script:
Copy code
...
docker pull pactfoundation/pact-cli:latest
docker run pactfoundation/pact-cli:latest pact-broker list-latest-pact-versions --output=json --broker-base-url=$PactBrokerBaseUrl --broker-username=$PactBrokerUsername --broker-password=$PactBrokerPassword
But I get the following error:
Copy code
<internal:/usr/local/lib/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- pact_broker/client/pacts/list_latest_versions (LoadError)
        from <internal:/usr/local/lib/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
        from /usr/lib/ruby/gems/3.3.0/gems/pact_broker-client-1.76.0/lib/pact_broker/client/cli/pact_commands.rb:44:in `list_latest_pact_versions'
        from /usr/lib/ruby/gems/3.3.0/gems/thor-1.3.1/lib/thor/command.rb:28:in `run'
        from /usr/lib/ruby/gems/3.3.0/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/lib/ruby/gems/3.3.0/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch'
        from /usr/lib/ruby/gems/3.3.0/gems/thor-1.3.1/lib/thor/base.rb:584:in `start'
        from /usr/lib/ruby/gems/3.3.0/gems/pact_broker-client-1.76.0/lib/pact_broker/client/cli/custom_thor.rb:34:in `start'
        from /usr/lib/ruby/gems/3.3.0/gems/pact_broker-client-1.76.0/bin/pact-broker:10:in `<top (required)>'
        from /usr/bin/pact-broker:25:in `load'
        from /usr/bin/pact-broker:25:in `<main>'
Am I using the pact-cli command wrongly or is something wrong with that docker image?
y
It actually looks like an issue in the rubygem https://rubygems.org/gems/pact_broker-client I downloaded the gem and extracted the gem contents and it is missing the `pacts`folder which contains https://github.com/pact-foundation/pact_broker-client/tree/master/lib/pact_broker/client/pacts Checking now as to why that has happened. I assume we might have pacts in a .gitignore file (maybe)
Got a fix in place now so will get that out and go through the release motions for the docker image and standalone. Cheers for raising dude
Docker image will be released in about 40 mins, running through release workflow now https://github.com/pact-foundation/pact-ruby-cli/actions/runs/10491859132
c
Thats great and very appreciated.
y
released now so should be good for a retest. You may need to pull the image to get the latest
c
Yes, have tested it again with the new docker image and can confirm that its working now. Thanks again.