Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Incorrect file permissions for Ruby #8128

Closed
theseanything opened this issue Sep 18, 2018 · 3 comments
Closed

Incorrect file permissions for Ruby #8128

theseanything opened this issue Sep 18, 2018 · 3 comments

Comments

@theseanything
Copy link
Contributor

When setting up a brand new VM I experience the follow issues.
Running ./update-bundler.sh fails to run with the following error for some repos:

Errno::EPERM: Operation not permitted @ chown_internal -
/tmp/bundler20180918-9784-17s3u11rake-12.3.1/bin

Running bundle install in some repos produces:

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/lib/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0 directory.

It appears the /usr/lib/rbenv/versions/ is owned by root:root
The errors are fixed when changing permissions:

sudo chown vagrant -R /usr/lib/rbenv/versions/
sudo chgrp vagrant -R /usr/lib/rbenv/versions/
@thomasleese
Copy link
Contributor

There are some docs about this problem: https://docs.publishing.service.gov.uk/manual/gem-file-permission-errors.html

Although it suggests an alternative solution, maybe the docs need updating?

@ChrisBAshton
Copy link
Contributor

FWIW, I think I had to do the same thing (sudo chown vagrant -R /usr/lib/rbenv/versions/).

@tijmenb
Copy link
Contributor

tijmenb commented Aug 15, 2019

Let's close this, as we are focusing our development efforts on https://github.com/alphagov/govuk-docker.

@tijmenb tijmenb closed this as completed Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants