features icon indicating copy to clipboard operation
features copied to clipboard

Ruby Bundle install fails due to permission error

Open ankur198 opened this issue 1 year ago • 2 comments

When using ghcr.io/devcontainers/features/ruby:1": {} with mcr.microsoft.com/devcontainers/base:jammy image. Whenever bundle install command is run it fails with the following error:

Installing aws-sdk-core 3.191.2 Bundler::PermissionError: There was an error while trying to create /usr/local/rvm/gems/ruby-3.3.0/extensions/x86_64-linux/3.3.0/bigdecimal-3.1.6. It is likely that you need to grant executable permissions for all parent directories and write permissions for /usr/local/rvm/gems/ruby-3.3.0/extensions/x86_64-linux/3.3.0

ankur198 avatar Feb 22 '24 20:02 ankur198

Hi 👋

Can you try adding the following line to your Dockerfile or running 👇 command before "bundle install" ?

RUN su vscode -c "/usr/local/rvm/bin/rvm fix-permissions"

samruddhikhandale avatar Feb 23 '24 23:02 samruddhikhandale

Adding it in the Dockerfile did not really help on my side. However, adding /usr/local/rvm/bin/rvm fix-permissions to the postCreateCommand did work

sofianegargouri avatar May 21 '24 16:05 sofianegargouri