-
Notifications
You must be signed in to change notification settings - Fork 3
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
Actualizar Rails a 7.2.0
#515
Conversation
Starting in Rails 7.2, pid files are not used anymore in production: rails/rails#50644
We are experiencing some issues to deploy our changes, as the Docker build step is failing with the following error: ``` > [build 3/6] RUN bundle install && rm -rf ~/.bundle/ "/usr/local/bundle"/ruby/*/cache "/usr/local/bundle"/ruby/*/bundler/gems/*/.git && bundle exec bootsnap precompile --gemfile: 14.33 Installing warden 1.2.9 14.34 Fetching rack-protection 4.0.0 14.35 Installing rack-protection 4.0.0 14.36 Fetching sprockets 4.2.0 14.38 Installing sprockets 4.2.0 14.41 Fetching websocket-driver 0.7.6 14.42 Installing websocket-driver 0.7.6 with native extensions 21.46 Downloading net-pop-0.1.2 revealed dependencies not in the API or the lockfile 21.46 (net-protocol (>= 0)). 21.46 Running `bundle update net-pop` should fix the problem. ------ Dockerfile:35 -------------------- 34 | COPY Gemfile Gemfile.lock .ruby-version ./ 35 | >>> RUN bundle install && \ 36 | >>> rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ 37 | >>> bundle exec bootsnap precompile --gemfile 38 | -------------------- ERROR: failed to solve: process "/bin/sh -c bundle install && rm -rf ~/.bundle/ \"${BUNDLE_PATH}\"/ruby/*/cache \"${BUNDLE_PATH}\"/ruby/*/bundler/gems/*/.git && bundle exec bootsnap precompile --gemfile" did not complete successfully: exit code: 34 ``` After digging around for a bit it seems that the temporary solution until we update to Ruby 3.3.4 is to add it from the ruby repo as a dependency.
Gemfile
Outdated
# Needed until we update Ruby to 3.3.4 https://discuss.rubyonrails.org/t/rails-7-dockerfile-build-fails/86041/2 | ||
gem 'net-pop', github: 'ruby/net-pop' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
si no hay nada que nos bloquee usar 3.3.4 ya, yo propondria primero mergear el PR de 3.3.4 asi no tenemos que hacer esto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Estoy de acuerdo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Listo: c452dd7
This reverts commit e5c528b – now that we've updated Ruby to 3.3.4
…ency For some reason we need to run `bundle update net-pop` in order for the `Gemfile.lock` to include `net-pop`'s dependency on `net-protocol`, so that we ensure the latter is installed before the former and we don't run into the deploy issue that we were talking about in previous commits.
Algunas diferencias que veo con una app nueva de Rails 7.2:
|
Yo estaba pensando en agregarlos como parte de próximos PRs. Voy a crear unos tickets para que quede trackeado eso.
Para mi tiene sentido! Qué te parece dejarlo para un próximo PR?
Estoy de acuerdo 👍
Qué cambios te aparecen en Será un tema de que actualizamos Si corro diff --git a/bin/bundle b/bin/bundle
index a71368e..50da5fd 100755
--- a/bin/bundle
+++ b/bin/bundle
@@ -27,7 +27,7 @@ m = Module.new do
bundler_version = nil
update_index = nil
ARGV.each_with_index do |a, i|
- if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
+ if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
bundler_version = a
end
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
@@ -41,13 +41,13 @@ m = Module.new do
gemfile = ENV["BUNDLE_GEMFILE"]
return gemfile if gemfile && !gemfile.empty?
- File.expand_path("../../Gemfile", __FILE__)
+ File.expand_path("../Gemfile", __dir__)
end
def lockfile
lockfile =
case File.basename(gemfile)
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
+ when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
else "#{gemfile}.lock"
end
File.expand_path(lockfile)
@@ -60,24 +60,19 @@ m = Module.new do
Regexp.last_match(1)
end
- def bundler_version
- @bundler_version ||=
- env_var_version || cli_arg_version ||
- lockfile_version
- end
-
def bundler_requirement
- return "#{Gem::Requirement.default}.a" unless bundler_version
-
- bundler_gem_version = Gem::Version.new(bundler_version)
-
- requirement = bundler_gem_version.approximate_recommendation
+ @bundler_requirement ||=
+ env_var_version ||
+ cli_arg_version ||
+ bundler_requirement_for(lockfile_version)
+ end
- return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
+ def bundler_requirement_for(version)
+ return "#{Gem::Requirement.default}.a" unless version
- requirement += ".a" if bundler_gem_version.prerelease?
+ bundler_gem_version = Gem::Version.new(version)
- requirement
+ bundler_gem_version.approximate_recommendation
end
def load_bundler! Podemos actualizarlo en otro PR si te parece 🙂
Tiene sentido!
Yo por ahora elegí no cambiarlo, pero si les parece que tiene sentido lo cambiamos, si.
Yo creo que sería bueno agregarlo cuando agreguemos el |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
por mi ok con hacer los cambios después (creemos un ticket para no olvidarnos)
Los cambios que veo del bin/bundle son los que pusiste ahí
Dale! Ya creé los tickets relacionados a lo que hablamos 👍 |
No description provided.