bin/rails aborted! with stacktrace involving prism and bundled_gems.rb
オープン
まだ誰も着手していません。
- 主要言語
- HTML
- スター
- 32
- フォーク
- 5
- 平均マージ
- 14時間 17分
- マージ済み PR(30日)
- 1
説明
When using the snap on Ubuntu 24.04.3, then installing rails, then creating a new rails project causes crash/error stacktrace (see below).
Steps to reproduce the problem
- Install ruby with
sudo snap install ruby --classic gem install rails, which by default goes into~/.gem- Running
rails new storewill displaybin/rails aborted!and a stacktrace that I'll paste below - The project does get created, but running any of the following will crash with a similar stacktrace:
bin/rails serverbin/rails db:create
Expected behavior
No stacktrace.
Actual behavior
The commands do no succeed and produce the following:
/snap/ruby/438/lib/ruby/3.4.0/prism.rb:83: warning: already initialized constant Prism::BACKEND
/snap/ruby/438/lib/ruby/3.4.0/prism.rb:83: warning: previous definition of BACKEND was here
/snap/ruby/438/lib/ruby/3.4.0/prism.rb:83: warning: already initialized constant Prism::BACKEND
/snap/ruby/438/lib/ruby/3.4.0/prism.rb:83: warning: previous definition of BACKEND was here
/snap/ruby/438/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require': NameError
from /snap/ruby/438/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from /snap/ruby/438/lib/ruby/3.4.0/prism.rb:85:in '<top (required)>'
from /snap/ruby/438/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /snap/ruby/438/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from ~/.gem/gems/rubocop-ast-1.47.1/lib/rubocop/ast.rb:4:in '<top (required)>'
from ~/.gem/gems/rubocop-ast-1.47.1/lib/rubocop-ast.rb:3:in 'Kernel#require_relative'
from ~/.gem/gems/rubocop-ast-1.47.1/lib/rubocop-ast.rb:3:in '<top (required)>'
from /snap/ruby/438/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /snap/ruby/438/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from ~/.gem/gems/rubocop-1.81.7/lib/rubocop.rb:19:in '<top (required)>'
from /snap/ruby/438/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /snap/ruby/438/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from ~/.gem/gems/rubocop-1.81.7/exe/rubocop:14:in '<top (required)>'
from ~/.gem/bin/rubocop:25:in 'Kernel#load'
from ~/.gem/bin/rubocop:25:in '<main>'
Ubuntu version
Ubuntu 24.04.3 LTS
Kernel version
Linux 6.14.0-34-generic
Ruby version
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
Rails version
Rails 8.1.1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提示されている snap、gem install、Rails のコマンドを使って Ubuntu 24.04.3 で失敗を再現し、prism.rb と bundled_gems.rb の stacktrace のパスを rubocop-ast の読み込みパスと比較します。rails new、bin/rails server、bin/rails db:create が Prism の警告や NameError なしで実行できれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rails, ruby, ubuntu
- 領域
- devops, operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100