I'm trying to run the following command:
bundle install
But the output is:
root@b431398437b1:/hermes-app# bundle install
Your RubyGems version (2.7.6.2) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Your Ruby version is 2.5.5, but your Gemfile specified 3.1.1
So, i wanna install rvm, rbenv or ruby-build for change the version, but all of them throw me an error. Anyone know's how to change the version using Dockerfile? Thanks in advance.
Here is my Dockerfile:
FROM debian:buster
# Install system dependencies
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common \
gnupg \
gpg-agent \
ruby-full
# Create the workspace into the container
RUN mkdir -p /hermes-app && \
chmod -R 777 /hermes-app
WORKDIR /hermes-app
COPY srcs/ /hermes-app/
# Install ruby dependencies
RUN gem install bundler
RUN bundle install