Ruby Bundle install fails due to permission error
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
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"
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