Skip to main content
Table of contents

Development VM

Fix issues with installing Ruby gems using Bundler

If you have an older version of RubyGems installed in your development VM, you may see errors such as the following when attempting to run bundle:

Gem::FilePermissionError: You don't have write permissions for the
/tmp/user/1000/bundler20180710-1078-kd7bl1rake-12.3.1/bin directory.
An error occurred while installing rake (12.3.1), and Bundler cannot continue.
Make sure that `gem install rake -v '12.3.1' --source ''` succeeds before

To fix these errors, upgrade RubyGems for each Ruby version installed in the VM by running sudo gem update --system.

Run this command in the root folder of each app which displays errors when running bundle since they may be using different versions of Ruby with their own old copy of RubyGems.

This page was last reviewed on 22 July 2019. It needs to be reviewed again on 22 July 2020 by the page owner #govuk-developers .
This page was set to be reviewed before 22 July 2020 by the page owner #govuk-developers. This might mean the content is out of date.