Load ruby gem before compile

I am using this azure_keyvault cookbook to load secrets.

I have added the default recipe to my runlist in my policyfile.

run_list %w(

In azure_test I have tried including azure_keyvault, loading through chef_gem then require azure_key_vault, etc. Everything I do ends up with an uninitialized constant due to the gem not being installed yet. If i try a second converge, it then works.

I know this is probably basic, but I need to advice on how to load a ruby gem pre-compile so that it doesnt bomb.