Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use build-arg to set rubygems version #2548

Merged
merged 1 commit into from Nov 30, 2020

Conversation

sonalkr132
Copy link
Member

Fixes mismatch between expected gem version and installed gem version.
As of now installed version of gem in prod is 3.0.3, when we expect
it to be 2.6.10.
In Dockerfile in we were copying /usr/local/bin/gem, which is just
a loader and doesn't decide rubygems version.
Copying /usr/local/lib/ruby/2.6.0/rubygem from builder would most likely
work but this seems unconventional and doesn't really save as much build time.

@sonalkr132 sonalkr132 force-pushed the rubygems-build-arg branch 2 times, most recently from 2b3aa04 to 8958cac Compare November 9, 2020 08:06
Dockerfile Outdated
@@ -23,7 +25,7 @@ ADD https://s3-us-west-2.amazonaws.com/oregon.production.s3.rubygems.org/version
RUN mv /app/config/database.yml.example /app/config/database.yml


RUN gem install bundler io-console --no-ri --no-rdoc && \
RUN gem install bundler io-console --no-rdoc && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--no-document?

Fixes mismatch between expected gem version and installed gem version.
As of now installed version of gem in prod is `3.0.3`, when we expect
it to be 2.6.10.
In Dockerfile in we were copying `/usr/local/bin/gem`, which is just
a loader and doesn't decide rubygems version.
Copying `/usr/local/lib/ruby/2.6.0/rubygem` from builder would most likely
work but this seems unconventional and doesn't really save as much build time.
Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@sonalkr132 sonalkr132 merged commit 1fde3f6 into rubygems:master Nov 30, 2020
@sonalkr132 sonalkr132 temporarily deployed to staging December 2, 2020 14:51 Inactive
@sonalkr132 sonalkr132 temporarily deployed to production December 3, 2020 09:59 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants