Closed laurensknoll closed 4 years ago
Thanks for reporting this @laurensknoll. This is rather surprising to me because the Ruby language and the community usually does not introduce such breaking changes in the spirit of programmers' happiness mantra. If it was done for a good reason, I hope this gets addressed in the base docker images of affected Ruby versions instead of requiring every user to set this environment variable explicitly. I would like to see any discussions around this change, if you have any references handy.
I usually prefer a change that is forward-looking and ideally backward-compatible. However, in this case I would go for a more explicit version specification of Ruby (i.e., ruby:2.6
) for the simple reason of not adding yet another instruction in the Dockerfile
that we will end up describing unnecessarily or confusing beginners of this tutorial.
Please note that any changes need to be reflected in the specific branch as well as corresponding directory of the master
branch, so you need to create two separate PRs.
Thanks for the feedback. Just created two PR's that set the Ruby image version to 2.6.
Thanks for PRs, I have created one in the tutorial repo as well https://github.com/play-with-docker/play-with-docker.github.io/pull/197.
I filed this issue upstream with the maintainers of the Docker image: https://github.com/docker-library/ruby/issues/305
Step 6 currently fails on docker run. A LoadError occurs for the "sinatra"-gem.
Error
Cause
Step 6 uses the ruby:2-image. As of December 27th this is Ruby version 2.7 Ruby PR. With this image, the "bundle install" command installs to "/usr/local/bundle/ruby/2.7.0" vs "/usr/local/bundle".
The version-specific path is not configured in the Gem environment. Causing the LoadError.
Resolution
To get step 6 running, I found two options:
1 Restore old behaviour and use Ruby 2.6
2 Add version-specific bundle path to the GEM_PATH environment variable
Please let me know what kind of resolution is accepted and I'll be happy to submit a PR.