Ruby Gems are installed into a single directory by default. You can get the location of this directory with gem environment gemdir. If you want to change this directory you can set the
$GEM_HOME environment variable, this will be picked up by gem install and it’ll install the Gems to the location specified by
- Open your app’s
- Add a
Scriptstep to your workflow.
$GEM_HOMEenvironment variable in the
- script: title: Set GEM_HOME env var inputs: - content: |- #!/bin/bash set -ev envman add --key GEM_HOME --value "$(gem environment gemdir)"
Cache:Pullstep after the
Git Clonebut before the
IMPORTANT: Make sure that your step is version 1.0.0 or newer.
- Insert the
Cache:Pushstep to the very end of your workflow.
And you’re done!