Closed PGhalke closed 4 years ago
@bethesque FYI. ^^
So on my Mac (osx 10.15.4) running the exact commands described in that standalone release work (running from /tmp
):
curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.84.0/pact-1.84.0-osx.tar.gz
tar xzf pact-1.84.0-osx.tar.gz
cd pact/bin
./pact-mock-service --help start
./pact-provider-verifier --help verify
Result:
As an aside, this package is used by many of our tools (e.g. Pact JS, Pact Go, Pact .NET). If the package didn't work on a Mac, we would have found out by now.
So it is likely something related to your configuration.
Could you please provide a way for us to reproduce your issue?
Thanks @mefellows for the update, i tried to exactly do the steps you mentioned above and now it works.
The only difference was earlier I used the Archive Utility tool to extract the tar contents and run the command, unlike now where i used "tar xzf
I tried extracting the tar again with Archive utility and i see the issue happening again
$ cd pact/bin/ $ ./pact-mock-service --help start Killed: 9 $ ./pact-mock-service --help start /pact/lib/ruby/bin/ruby: line 6: pact/lib/ruby/bin.real/ruby: No such file or directory
so looks like we might have to use the "tar" command to untar the package, which make it work.
Many Thanks
The issue seems to be related to a recent security change in Mac OSX.
Because you extracted the contents using the Archine Utility, somehow, OSX knows it was downloaded from the internet and is sandboxing the binary. I've seen this before with other downloadable files. You need to right-click and then open, but for this case, just install using the CLI.
There is a brew version of the pact-ruby-standalone https://github.com/pact-foundation/homebrew-pact-ruby-standalone that would side step this issue
Thanks @mefellows and @bethesque.
Pre issue-raising checklist
I have already (please mark the applicable with an
x
):Software versions
Expected behaviour
$ ./pact-mock-service --help start should have started the mock service.
Actual behaviour
$ ./pact-mock-service --help start ended with the error: $ ./pact-mock-service --help start /pact/lib/ruby/bin/ruby: line 6: /pact/lib/ruby/bin.real/ruby: No such file or directory
Steps to reproduce
I was trying to work with the Pact-Mock-Server as per the instructions given in the ReadMe at https://github.com/pact-foundation/pact-ruby-standalone/releases/tag/v1.84.0
Downloaded the pact tar available for Mac OS in the link mentioned above, which is pact-1.84.0-osx.tar.gz.
Mac's Achive Utility tools untars the above mentioned tar into the folder with structure pact pact/bin/ pact/lib/ Readme.md
After the untar, when i try to execute the command $ ./pact-mock-service --help start /pact/lib/ruby/bin/ruby: line 6: /Users/preethighalke/pact/lib/ruby/bin.real/ruby: No such file or directory the command fails with the above error.
Relevent log files
NA