I am trying to dockerize a rails application and I get this error Your Ruby version is 3.0.7, but your Gemfile specified 3.1.2.
FROM ruby:3.0-bullseye as base
RUN apt-get update -qq && apt-get install -y build-essential apt-utils libpq-dev nodejs
WORKDIR /docker/app
RUN gem install bundler
COPY Gemfile* ./
RUN bundle install
ADD . /docker/app
ARG DEFAULT_PORT 3000
EXPOSE ${DEFAULT_PORT}
CMD ["bin/rails server"] # you can also write like this.
Error
Your Ruby version is 3.0.7, but your Gemfile specified 3.1.2