Skip to content

Commit

Permalink
Update Ruby 2.7's default rubygems version, or it fails to install rails
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Jan 4, 2024
1 parent 8aae060 commit 0d10284
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dockerfiles/ruby.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ ARG RAILS_VERSION

# Ruby 2.4's bundled rubygems is too old that it fails to install rails
RUN if ruby -v | grep -qF 'ruby 2.4.'; then gem update --system 3.3.26; fi
# Ruby 2.7's bundled rubygems is so buggy that it ignores required_ruby_version limitation
RUN if ruby -v | grep -qF 'ruby 2.7.'; then gem update --system 3.4.22; fi

RUN gem install rails -v "~>${RAILS_VERSION}.0"

ENV RAILS_VERSION ${RAILS_VERSION}
Expand Down

0 comments on commit 0d10284

Please sign in to comment.