fly-apps / dockerfile-rails

Provides a Rails generator to produce Dockerfiles and related files.
MIT License
455 stars 38 forks source link

Ruby 3.3.3 issue: net-pop #107

Closed rubys closed 6 days ago

rubys commented 6 days ago

See: https://stackoverflow.com/questions/78617432/strange-bundle-update-issue-disappearing-net-pop-0-1-2-dependency

rubys commented 6 days ago

Workaround:

diff --git a/Dockerfile b/Dockerfile
index eba01ff..5978eec 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,7 +23,8 @@ RUN apt-get update -qq && \

 # Install application gems
 COPY Gemfile Gemfile.lock ./
-RUN bundle install && \
+RUN sed -i "/net-pop (0.1.2)/a\      net-protocol" Gemfile.lock && \
+    bundle install && \
     rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
     bundle exec bootsnap precompile --gemfile
rubys commented 6 days ago

Test to see if this problem affects your application:

ruby -r bundler -e 'p Bundler::LockfileParser.new(Bundler.read_file("Gemfile.lock")).specs.find {|spec| spec.name == "net-pop"}&.dependencies&.empty?'

If the result is nil or false you are OK. If the result is true, the bug affects you and will prevent successful deployment.