Bug #20450
closedRuby 3.3.1 broken with bootsnap
Description
The issue looks like https://bugs.ruby-lang.org/issues/20060
With the new release of ruby 3.1.1, bootsnap does not work anymore.
bin/rails aborted!
ArgumentError: comparison of String with nil failed (ArgumentError)
msg = " #{RUBY_VERSION < SINCE[gem] ? "will no longer be" : "is not"} part of the default gems since Ruby #{SINCE[gem]}."
^^^^^^^^^^
/usr/local/bundle/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
It's working with DISABLE_BOOTSNAP=1 with the following message : warning: parser/current is loading parser/ruby33, which recognizes 3.3.0-compliant syntax, but you are running 3.3.1.
Updated by hsbt (Hiroshi SHIBATA) 11 days ago
- Status changed from Open to Assigned
- Assignee set to hsbt (Hiroshi SHIBATA)
Can you provide your Gemfile
? I did confirm to work that with bootsnap and zeitwerk at https://github.com/ruby/ruby/pull/10347#issuecomment-2017204802
Updated by philippe.bs.noel@tutanota.com (Philippe Noel) 11 days ago
hsbt (Hiroshi SHIBATA) wrote in #note-1:
Can you provide your
Gemfile
? I did confirm to work that with bootsnap and zeitwerk at https://github.com/ruby/ruby/pull/10347#issuecomment-2017204802
$ cat Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 7.1.0'
gem 'bootsnap', require: false
gem 'winrm'
Updated by eugeneius (Eugene Kenny) 11 days ago
I submitted a fix for this issue at https://github.com/ruby/ruby/pull/10619.
Updated by hsbt (Hiroshi SHIBATA) 11 days ago
- Subject changed from Ruby 3.1.1 broken with bootsnap to Ruby 3.3.1 broken with bootsnap
Updated by professor (Todd Sedano) 11 days ago
Thank you for fixing this. I confirmed that making this change fixed Ruby 3.3.1 for gusto
Updated by shan (Shannon Skipper) 11 days ago ยท Edited
For what it's worth, here are some untested install scripts using a minimalist version of @eugeneius's patch for ruby-install, RVM, rbenv and asdf.
ruby-install --patch https://gist.githubusercontent.com/havenwood/57ef01e562bc5ac2939477cc842cc9ad/raw/57ef01e562bc5ac2939477cc842cc9ad/raw/0509f4df6d7e8e5e4a16eae2ef43f903b2b265d6/delete_archdir_prefix.patch ruby-3.3.1
rvm install 3.3.1 --patch https://gist.githubusercontent.com/havenwood/57ef01e562bc5ac2939477cc842cc9ad/raw/57ef01e562bc5ac2939477cc842cc9ad/raw/0509f4df6d7e8e5e4a16eae2ef43f903b2b265d6/delete_archdir_prefix.patch
rbenv install --patch 3.3.1 < <(curl -s https://gist.githubusercontent.com/havenwood/57ef01e562bc5ac2939477cc842cc9ad/raw/0509f4df6d7e8e5e4a16eae2ef43f903b2b265d6/delete_archdir_prefix.patch)
RUBY_APPLY_PATCHES=$(curl -s https://gist.githubusercontent.com/havenwood/57ef01e562bc5ac2939477cc842cc9ad/raw/0509f4df6d7e8e5e4a16eae2ef43f903b2b265d6/delete_archdir_prefix.patch) asdf install ruby 3.3.1
Updated by hsbt (Hiroshi SHIBATA) 11 days ago
- Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED
Updated by eugeneius (Eugene Kenny) 11 days ago
- Status changed from Assigned to Closed
Applied in changeset git|67dd9af17e5c6c541a8cc84b1741deaf175fcf83.
[Bug #20450] Remove rubyarchdir from bootsnap paths
Updated by hsbt (Hiroshi SHIBATA) 11 days ago
Thanks all. I added https://github.com/ruby/ruby/pull/10619 to backport PR.
Sorry to your inconvenient experience for new stable version. https://bugs.ruby-lang.org/issues/20450#note-6 or https://github.com/ruby/ruby/pull/10619#issuecomment-2075896240 are good to temporary workaround for this issue until 3.3.2 release.
Updated by shan (Shannon Skipper) 9 days ago
RVM is now patching this by default for 3.3.1 installs. https://github.com/rvm/rvm/pull/5457