If this command returns errors, you may need to install the dependencies first, outside of the Makefile:
$ bundle install
If you receive the following error (where whoami == your username):
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: database "<whoami>" does not exist
Running the following command first, may solve the issue:
$ createdb `whoami`
$ make test
runs specs in parallel which could potentially return errors. Running specs serially may fix the problem; to run specs serially:
$ make test_serial
If you get this error during test runs:
Failure/Error: JWT::JWK.import(certs_response[:keys].first).public_key
OpenSSL::PKey::PKeyError:
rsa#set_key= is incompatible with OpenSSL 3.0
This problem has happened when Ruby was built and linked against the wrong version of OpenSSL.
The procedure we have found that fixes the problem is to rebuild Ruby, linked against the correct version of OpenSSL, then remove and reinstall all of your gems.
These instructions have been used successfully for environments
managed using asdf
, chruby
and rbenv
. Details for each are
below.
If you are using another Ruby version manager, the section on
ruby-build
is likely your best starting point. Please add your
experience and any useful information to this document.
- These instructions assume you're on a Mac; if not, you will have to work out the equivalent directions based on these.
- As of this writing, the correct Ruby version for Identity Reporting is 3.2.2. Use whatever the current version is.
brew --prefix [email protected]
If not present, run brew install [email protected]
Most version managers simply require that the correct version of Ruby
be installed, usually using ruby-build
.
asdf
uses ruby-build
under the covers, but supplies some
configuration of its own, so we must use asdf
to (re-)install Ruby.
Remove the existing Ruby version, if present:
asdf uninstall ruby 3.2.2
And re-install, using the correct OpenSSL installation:
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])" asdf install ruby 3.2.2
Use the ruby-build
instructions; chruby
doesn't require anything special.
Use the ruby-build
instructions; rbenv
doesn't require anything special, although use ~/.rbenv/versions
for the install location, not ~/.rubies
.
Make sure ruby-build is up to date
brew upgrade ruby-build
And then rebuild Ruby (this assumes your Rubies are in ~/.rubies)
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])" ruby-build 3.2.2 ~/.rubies/3.2.2
After your Ruby is built, exit your shell and open a new one, to clear caches.
gem uninstall -aIx
bundle install