gitpod-io / workspace-images

Ready to use docker images for Gitpod workspaces
https://hub.docker.com/u/gitpod
MIT License
475 stars 321 forks source link

RVM not working anymore correctly - Ruby not found #989

Open shayani opened 1 year ago

shayani commented 1 year ago

Bug description

Suddenly, without any changes, Gitpod workspace doesn`t find the ruby executable anymore. It worked for months and since last week, stopped working.

Steps to reproduce

# .gitpod.Dockerfile
FROM gitpod/workspace-full:2022-09-11-15-11-40
USER gitpod

# Install Ruby version 2.6.1 and set it as default
RUN echo "gem: --no-document" >> ~/.gemrc
RUN echo "rvm_gems_path=/home/gitpod/.rvm" > ~/.rvmrc
RUN bash -lc "rvm install ruby-2.6.1 && \
              rvm use ruby-2.6.1 --default && \
              gem update --system 3.3.26"
RUN echo "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc
# .gitpod
image:
  file: .gitpod.Dockerfile

tasks:
  - name: Setup application
    init: |
      gem update --system 3.3.26
      gem install bundler:2.3.26
      gem install rubocop rubocop-rails rubocop-performance solargraph
      bundle install 
    command: |
      bundle exec rails server -b 0.0.0.0 -p 3000

I get the error when trying to excute bundler: /workspace/.rvm/ruby-2.6.1/bin/bundle: 6: exec: /workspace/.rvm/ruby-2.6.1/bin/ruby: not found

Workspace affected

All workspaces in my private repo

Expected behavior

ruby executable should be found. It exists on /home/gitpod/.rvm/ruby-2.6.1/bin, but doesn't at /workspace/.rvm/ruby-2.6.1/bin

Example repository

No response

Anything else?

No response

Front logo Front conversations

shayani commented 1 year ago

Hi @jimmybrancaccio. Did you have a chance to take a look? What's your opinion?