pact-foundation / pact-ruby-standalone

A standalone pact command line executable using the ruby pact implementation and Travelling Ruby
https://pact.io
MIT License
39 stars 32 forks source link

Error on Windows installation pact-mock-service.rb:1:in `require': cannot load such file -- pact/mock_service/cli (LoadError) #76

Closed ShvetsovZE closed 2 years ago

ShvetsovZE commented 2 years ago

Pre issue-raising checklist

I have already (please mark the applicable with an x):

Software versions

Expected behavior

Pact standalone executables are being installed via CMD after following the Windows installation guide and in particular, running .\bin\pact-mock-service.bat --help start

Actual behaviour

pact-mock-service.bat throws a following error from ruby file C:\tools\pact>.\bin\pact-mock-service.bat --help start C:/tools/pact/lib/app/pact-mock-service.rb:1:in require': cannot load such file -- pact/mock_service/cli (LoadError) from C:/tools/pact/lib/app/pact-mock-service.rb:1:in

'

Steps to reproduce

Simply follow the Windows installation guide

Download package, unzip, then run: $ cd pact $ .\bin\pact-mock-service.bat --help start $ .\bin\pact-provider-verifier.bat --help verify

Side notes

We tested it with colleague on Mac OS and it works perfectly fine

bethesque commented 2 years ago

I'm a bit confused by this one. @uglyog can reproduce the issue on his machine.

C:\Users\ron\Downloads\pact-1.88.89-win32\pact>bin\pact.bat
C:/Users/ron/Downloads/pact-1.88.89-win32/pact/lib/app/pact.rb:1:in `require': cannot load such file -- pact/cli (LoadError)
        from C:/Users/ron/Downloads/pact-1.88.89-win32/pact/lib/app/pact.rb:1:in `<main>'

I am not a windows user, but my husband is in the office today so I fumbled around with his windows machine and managed to run it without any issues at all. (I took a photo of the screen because it was quicker than working out how to do a screenshot and then working out how to transfer the image to my machine πŸ˜† )

20220527_110002

bethesque commented 2 years ago

Link to problem file: https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.88.89/pact-1.88.89-win32.zip

bethesque commented 2 years ago

Given that the code is the same, it seems like it must be some kind of environmental issue, the most likely cause being an environment variable that's affecting the load path somehow.

Could you edit the .bat file and get it to print out your environment variables?

Inksprout commented 2 years ago

I haven't been able to reproduce this on my windows machine 279933029_414493093865422_4007159061801292260_n windows version:

Edition Windows 10 Home Version 21H1 Installed on β€Ž10/β€Ž08/β€Ž2020 OS build 19043.1706 Experience Windows Feature Experience Pack 120.2212.4170.0

YOU54F commented 2 years ago

Just tested against GitHub's two windows runners and all good πŸ€·πŸΎβ€β™‚οΈ - Will fire up my windows 10 desktop and try shortly

windows-2019 - https://github.com/YOU54F/pact-standalone-windows-test/runs/6624009271?check_suite_focus=true#step:3:2731 windows-latest - https://github.com/YOU54F/pact-standalone-windows-test/runs/6624009212?check_suite_focus=true#step:3:2731


name: test standalone

on:
  workflow_dispatch:

jobs:

  build:
    strategy:
      fail-fast: false
      matrix:
        os: [windows-latest,windows-2019]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v3
      - name: test standalone against ${{ matrix.os }}
        run: |
          curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.88.89/pact-1.88.89-win32.zip
          unzip pact-1.88.89-win32.zip
          cd pact
          ./bin/pact-mock-service --help start
          ./bin/pact-provider-verifier --help verify
YOU54F commented 2 years ago

You can also run these commands via our Docker CLI tool, which may get you over the hump for now

https://hub.docker.com/r/pactfoundation/pact-cli

ShvetsovZE commented 2 years ago

@YOU54F docker CLI does work for me at the moment, but it's not ideal, thank you for addressing this issue. Fingers crossed you would be able to find a root cause

YOU54F commented 2 years ago

Hey @ShvetsovZE

Just setting up various machines at home to test this out cross platform.

In the meantime could you help by providing any additional detail that may be useful.

Which shell are you using? the default CMD shell?

Have you used this machine for other development, which tools do you have setup?

Do you have WSL/WSL2, or git bash available?

Has this ever worked for you, or is it this particular version?

I need to compile a list of the various shells for windows and a bit of an installation guide, so this might help as a starter for 10!

I'll build up a testing matrix, and get it to build against all versions/platforms.

I've started the beginnings against on our example repos https://github.com/pactflow/example-bi-directional-consumer-cypress/blob/os_detection/.github/workflows/cross_test.yml

Many thanks

YOU54F commented 2 years ago

You can also run it directly as a ruby gem, if that helps as an alternative to the Docker CLI

https://github.com/pact-foundation/pact-mock_service#with-ruby

bethesque commented 2 years ago

Could you edit the .bat file and get it to print out your environment variables?

YOU54F commented 2 years ago

Tested this on the wife's laptop this evening, using a vanilla cmd prompt. zero dev things on the machine and all good, the only thing missing, it is extracted the folder via windows explorer gui as there is no unzip in the cmd prompt

this is on a home edition, I have a pro edition, but no enterprise.

Edition Windows 10 Home
Version 21H2
Installed on β€Ž20/β€Ž11/β€Ž2020
OS build 19044.1706
Experience Windows Feature Experience Pack 120.2212.4170.0

Device name Lenovo-PC
Processor Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz   2.20 GHz
Installed RAM 8.00 GB
System type 64-bit operating system, x64-based processor
Pen and touch Touch support with 10 touch points
Capture Capture2
ShvetsovZE commented 2 years ago

@YOU54F I have the whole bunch of dev stuff installed including git bash, .net full set up, nvm, and nmp, docker etc. Should I try to run it in the different cmd shell?

ShvetsovZE commented 2 years ago

@bethesque as you asked i've adjusted a bet file to show environment variables. I hope that's going to be helpful C:\tools\pact>.\bin\pact-mock-service.bat --help start ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\ZhanS\AppData\Roaming ChocolateyInstall=C:\ProgramData\chocolatey ChocolateyLastPathUpdate=132890202251066729 ChocolateyToolsLocation=C:\tools CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=****-7276 ComSpec=C:\windows\system32\cmd.exe DriverData=C:\Windows\System32\Drivers\DriverData HOMEDRIVE=C: HOMEPATH=\Users\ZhanS LOCALAPPDATA=C:\Users\ZhanS\AppData\Local LOGONSERVER=\\***-7276 NPM_IDENT=******== NPM_TOKEN=****== NUGET_PAT=***** NUMBER_OF_PROCESSORS=12 NVM_HOME=C:\ProgramData\nvm NVM_SYMLINK=C:\Program Files\nodejs OneDrive=C:\Users\ZhanS\OneDrive - ***Ltd OneDriveCommercial=C:\Users\ZhanS\OneDrive - ***Ltd OnlineServices=Online Services OS=Windows_NT Path=C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\ProgramData\nvm;C:\Program Files\nodejs;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\dotnet\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\ZhanS\AppData\Local\Microsoft\WindowsApps;C:\Users\ZhanS\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Users\ZhanS\AppData\Local\Programs\Fiddler;C:\tools\Cmder;C:\tools\flutter\bin;C:\Users\ZhanS\AppData\Roaming\npm PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PGADMIN_DEFAULT_EMAIL=test@test.com PGADMIN_DEFAULT_PASSWORD=DEFAULT_PASSWORD platformcode=AN PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 2, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=a502 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PROMPT=$P$G PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\ PUBLIC=C:\Users\Public RegionCode=APJ SerkoLogStorageConnectionString=UseDevelopmentStorage=true SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\windows TEMP=C:\Users\ZhanS\AppData\Local\Temp TMP=C:\Users\ZhanS\AppData\Local\Temp USERDOMAIN=AzureAD USERDOMAIN_ROAMINGPROFILE=AzureAD USERNAME=ZhanS USERPROFILE=C:\Users\ZhanS windir=C:\windows ZES_ENABLE_SYSMAN=1 C:/tools/pact/lib/app/pact-mock-service.rb:1:in "require": cannot load such file -- pact/mock_service/cli (LoadError) from C:/tools/pact/lib/app/pact-mock-service.rb:1:in "<main>"

bethesque commented 2 years ago

formatted vals for analysis:


ALLUSERSPROFILE=C:\ProgramData 
APPDATA=C:\Users\ZhanS\AppData\Roaming 
ChocolateyInstall=C:\ProgramData\chocolatey 
ChocolateyLastPathUpdate=132890202251066729 
ChocolateyToolsLocation=C:\tools 
CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(
x86)=C:\Program Files (x86)\Common Files 
CommonProgramW6432=C:\Program Files\Common Files 
COMPUTERNAME=****-7276 
ComSpec=C:\windows\system32\cmd.exe 
DriverData=C:\Windows\System32\Drivers\DriverData 
HOMEDRIVE=C: 
HOMEPATH=\Users\ZhanS 
LOCALAPPDATA=C:\Users\ZhanS\AppData\Local 
LOGONSERVER=\\***-7276 
NPM_IDENT=******== 
NPM_TOKEN=****== 
NUGET_PAT=***** 
NUMBER_OF_PROCESSORS=12 
NVM_HOME=C:\ProgramData\nvm 
NVM_SYMLINK=C:\Program Files\nodejs 
OneDrive=C:\Users\ZhanS\OneDrive - ***Ltd 
OneDriveCommercial=C:\Users\ZhanS\OneDrive - ***Ltd 
OnlineServices=Online Services 
OS=Windows_NT 
Path=C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\ProgramData\nvm;C:\Program Files\nodejs;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\dotnet\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\ZhanS\AppData\Local\Microsoft\WindowsApps;C:\Users\ZhanS\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Users\ZhanS\AppData\Local\Programs\Fiddler;C:\tools\Cmder;C:\tools\flutter\bin;C:\Users\ZhanS\AppData\Roaming\npm 
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC 
PGADMIN_DEFAULT_EMAIL=test@test.com 
PGADMIN_DEFAULT_PASSWORD=DEFAULT_PASSWORD 
platformcode=AN 
PROCESSOR_ARCHITECTURE=AMD64 
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 2, GenuineIntel 
PROCESSOR_LEVEL=6 
PROCESSOR_REVISION=a502 
ProgramData=C:\ProgramData 
ProgramFiles=C:\Program Files ProgramFiles(
x86)=C:\Program Files (x86) 
ProgramW6432=C:\Program Files 
PROMPT=$P$G 
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\ 
PUBLIC=C:\Users\Public 
RegionCode=APJ 
SerkoLogStorageConnectionString=
UseDevelopmentStorage=true 
SESSIONNAME=Console 
SystemDrive=C: 
SystemRoot=C:\windows 
TEMP=C:\Users\ZhanS\AppData\Local\Temp 
TMP=C:\Users\ZhanS\AppData\Local\Temp 
USERDOMAIN=AzureAD 
USERDOMAIN_ROAMINGPROFILE=AzureAD 
USERNAME=ZhanS 
USERPROFILE=C:\Users\ZhanS 
windir=C:\windows 
ZES_ENABLE_SYSMAN=1
bethesque commented 2 years ago

Ok, looking at https://github.com/pact-foundation/pact-ruby-standalone/blob/master/packaging/pact-mock-service.bat there's nothing obvious in those env vars that is clashing with any that are defined in the .bat file.

Next steps.

Can you open up the pact-mock-service.bat file on your machine and remove the line that says @echo off so we can see what each line is being resolved to.

Also, can you open C:/tools/pact/lib/app/pact-mock-service.rb on your machine and add the following line at the very top.

puts $LOAD_PATH

That will tell us the paths that the file is meant to be loaded from. Then, can you verify that the file it can't find is actually available at one of those load paths.

We do occasionally have issues with requires not working for very long paths in windows, but this is not a long path.

Please share the output from each of those changes here.

ShvetsovZE commented 2 years ago

@bethesque Output command line without @echo off

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\ZhanS\AppData\Roaming
BUNDLE_FROZEN=1
BUNDLE_GEMFILE=C:\tools\pact\lib\vendor\Gemfile
ChocolateyInstall=C:\ProgramData\chocolatey
ChocolateyLastPathUpdate=132890202251066729
ChocolateyToolsLocation=C:\tools
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=****-7276
ComSpec=C:\windows\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=\Users\ZhanS
LOCALAPPDATA=C:\Users\ZhanS\AppData\Local
LOGONSERVER=\\****-7276
NPM_IDENT=***==
NPM_TOKEN=***==
NUGET_PAT=***
NUMBER_OF_PROCESSORS=12
NVM_HOME=C:\ProgramData\nvm
NVM_SYMLINK=C:\Program Files\nodejs
OneDrive=C:\Users\ZhanS\OneDrive - **** Ltd
OneDriveCommercial=C:\Users\ZhanS\OneDrive - **** Ltd
OnlineServices=Online Services
OS=Windows_NT
Path=C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\ProgramData\nvm;C:\Program Files\nodejs;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\dotnet\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\ZhanS\AppData\Local\Microsoft\WindowsApps;C:\Users\ZhanS\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Users\ZhanS\AppData\Local\Programs\Fiddler;C:\tools\Cmder;C:\tools\flutter\bin;C:\Users\ZhanS\AppData\Roaming\npm
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PGADMIN_DEFAULT_EMAIL=test@test.com
PGADMIN_DEFAULT_PASSWORD=DEFAULT_PASSWORD
platformcode=AN
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=a502
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\
PUBLIC=C:\Users\Public
RegionCode=APJ
ROOT_PATH=C:\tools\pact
RUBYLIB=C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby\2.2.0;C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby\2.2.0\i386-mingw32;C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby;C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby\2.2.0;C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby\2.2.0\i386-mingw32;C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby;C:\tools\pact\lib\ruby\bin\..\lib\ruby\2.2.0;C:\tools\pact\lib\ruby\bin\..\lib\ruby\2.2.0\i386-mingw32
RUNNING_PATH=C:\tools\pact\bin\
****LogStorageConnectionString=UseDevelopmentStorage=true
SESSIONNAME=Console
SSL_CERT_FILE=C:\tools\pact\lib\ruby\bin\..\lib\ca-bundle.crt
SystemDrive=C:
SystemRoot=C:\windows
TEMP=C:\Users\ZhanS\AppData\Local\Temp
TMP=C:\Users\ZhanS\AppData\Local\Temp
USERDOMAIN=AzureAD
USERDOMAIN_ROAMINGPROFILE=AzureAD
USERNAME=ZhanS
USERPROFILE=C:\Users\ZhanS
windir=C:\windows
ZES_ENABLE_SYSMAN=1

C:\tools\pact>SET RUNNING_PATH=C:\tools\pact\bin\

C:\tools\pact>CALL :RESOLVE "C:\tools\pact\bin\\.." ROOT_PATH

C:\tools\pact>SET ROOT_PATH=C:\tools\pact

C:\tools\pact>GOTO :EOF

C:\tools\pact>set "BUNDLE_GEMFILE=C:\tools\pact\lib\vendor\Gemfile"

C:\tools\pact>set BUNDLE_IGNORE_CONFIG=

C:\tools\pact>set RUBYGEMS_GEMDEPS=

C:\tools\pact>set BUNDLE_APP_CONFIG=

C:\tools\pact>set BUNDLE_FROZEN=1
C:/tools/pact/lib/app/pact-mock-service.rb:1:in require: cannot load such file -- pact/mock_service/cli (LoadError)
        from C:/tools/pact/lib/app/pact-mock-service.rb:1:in <main>'
ShvetsovZE commented 2 years ago

@bethesque Command-line response without @echo off in bat and puts $LOAD_PATH in ruby file

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\ZhanS\AppData\Roaming
BUNDLE_FROZEN=1
BUNDLE_GEMFILE=C:\tools\pact\lib\vendor\Gemfile
ChocolateyInstall=C:\ProgramData\chocolatey
ChocolateyLastPathUpdate=132890202251066729
ChocolateyToolsLocation=C:\tools
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=****-7276
ComSpec=C:\windows\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=\Users\ZhanS
LOCALAPPDATA=C:\Users\ZhanS\AppData\Local
LOGONSERVER=\\****-7276
NPM_IDENT=***==
NPM_TOKEN=***==
NUGET_PAT=***
NUMBER_OF_PROCESSORS=12
NVM_HOME=C:\ProgramData\nvm
NVM_SYMLINK=C:\Program Files\nodejs
OneDrive=C:\Users\ZhanS\OneDrive - **** Ltd
OneDriveCommercial=C:\Users\ZhanS\OneDrive - **** Ltd
OnlineServices=Online Services
OS=Windows_NT
Path=C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\ProgramData\nvm;C:\Program Files\nodejs;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\dotnet\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\ZhanS\AppData\Local\Microsoft\WindowsApps;C:\Users\ZhanS\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Users\ZhanS\AppData\Local\Programs\Fiddler;C:\tools\Cmder;C:\tools\flutter\bin;C:\Users\ZhanS\AppData\Roaming\npm
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PGADMIN_DEFAULT_EMAIL=test@test.com
PGADMIN_DEFAULT_PASSWORD=DEFAULT_PASSWORD
platformcode=AN
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=a502
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\
PUBLIC=C:\Users\Public
RegionCode=APJ
ROOT_PATH=C:\tools\pact
RUBYLIB=C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby\2.2.0;C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby\2.2.0\i386-mingw32;C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby;C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby\2.2.0;C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby\2.2.0\i386-mingw32;C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby;C:\tools\pact\lib\ruby\bin\..\lib\ruby\2.2.0;C:\tools\pact\lib\ruby\bin\..\lib\ruby\2.2.0\i386-mingw32
RUNNING_PATH=C:\tools\pact\bin\
****LogStorageConnectionString=UseDevelopmentStorage=true
SESSIONNAME=Console
SSL_CERT_FILE=C:\tools\pact\lib\ruby\bin\..\lib\ca-bundle.crt
SystemDrive=C:
SystemRoot=C:\windows
TEMP=C:\Users\ZhanS\AppData\Local\Temp
TMP=C:\Users\ZhanS\AppData\Local\Temp
USERDOMAIN=AzureAD
USERDOMAIN_ROAMINGPROFILE=AzureAD
USERNAME=ZhanS
USERPROFILE=C:\Users\ZhanS
windir=C:\windows
ZES_ENABLE_SYSMAN=1

C:\tools\pact>SET RUNNING_PATH=C:\tools\pact\bin\

C:\tools\pact>CALL :RESOLVE "C:\tools\pact\bin\\.." ROOT_PATH

C:\tools\pact>SET ROOT_PATH=C:\tools\pact

C:\tools\pact>GOTO :EOF

C:\tools\pact>set "BUNDLE_GEMFILE=C:\tools\pact\lib\vendor\Gemfile"

C:\tools\pact>set BUNDLE_IGNORE_CONFIG=

C:\tools\pact>set RUBYGEMS_GEMDEPS=

C:\tools\pact>set BUNDLE_APP_CONFIG=

C:\tools\pact>set BUNDLE_FROZEN=1
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.63.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/table_print-1.5.7/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/pact-provider-verifier-1.36.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rspec_junit_formatter-0.5.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rack-reverse-proxy-0.12.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rack-proxy-0.7.2/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/pact-message-0.11.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/pact-1.62.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rack-test-1.1.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.9.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/webrick-1.3.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/thor-1.2.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rspec-3.11.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rspec-mocks-3.11.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rspec-expectations-3.11.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rspec-core-3.11.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rspec-support-3.11.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rack-2.1.4/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/pact-support-1.17.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/term-ansicolor-1.7.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/tins-1.31.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/sync-0.5.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/extensions/x86-mingw32/2.2.0/json-2.5.1
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/json-2.5.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/httparty-0.18.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/multi_xml-0.6.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/mime-types-3.4.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/mime-types-data-3.2022.0105/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/find_a_port-1.0.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/filelock-1.1.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/faraday_middleware-0.14.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/faraday-0.17.5/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/multipart-post-2.1.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/expgen-0.1.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/parslet-2.0.0/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/dig_rb-1.0.1/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/diff-lcs-1.5.0/lib
C:/tools/pact/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/gems/bundler-1.9.9/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/awesome_print-1.9.2/lib
C:/tools/pact/lib/vendor/ruby/2.2.0/gems/rake-13.0.6/lib
C:/tools/pact/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib
C:/tools/pact/lib/app/lib
C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby\2.2.0
C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby\2.2.0\i386-mingw32
C:\tools\pact\lib\ruby\bin\..\lib\ruby\site_ruby
C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby\2.2.0
C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby\2.2.0\i386-mingw32
C:\tools\pact\lib\ruby\bin\..\lib\ruby\vendor_ruby
C:\tools\pact\lib\ruby\bin\..\lib\ruby\2.2.0
C:\tools\pact\lib\ruby\bin\..\lib\ruby\2.2.0\i386-mingw32
C:/tools/pact/lib/ruby/bin.real/lib/ruby/site_ruby/2.2.0
C:/tools/pact/lib/ruby/bin.real/lib/ruby/site_ruby/2.2.0/i386-msvcrt
C:/tools/pact/lib/ruby/bin.real/lib/ruby/site_ruby
C:/tools/pact/lib/ruby/bin.real/lib/ruby/vendor_ruby/2.2.0
C:/tools/pact/lib/ruby/bin.real/lib/ruby/vendor_ruby/2.2.0/i386-msvcrt
C:/tools/pact/lib/ruby/bin.real/lib/ruby/vendor_ruby
C:/tools/pact/lib/ruby/bin.real/lib/ruby/2.2.0
C:/tools/pact/lib/ruby/bin.real/lib/ruby/2.2.0/i386-mingw32
C:/tools/pact/lib/app/pact-mock-service.rb:2:in `require': cannot load such file -- pact/mock_service/cli (LoadError)
        from C:/tools/pact/lib/app/pact-mock-service.rb:2:in `<main>'
ShvetsovZE commented 2 years ago

Any ideas on what could cause a problem @bethesque?

bethesque commented 2 years ago

Yes, it's a missing windows platform in the PLATFORMS section of the Gemfile.lock. I've fixed it in the latest version of the pact-ruby-standalone. Can you grab the latest copy from the releases page and test it?

ShvetsovZE commented 2 years ago

Sorry for the late reply @bethesque, looks like it's working now!