ruby / ruby/snap.ruby

bin/rails aborted! with stacktrace involving prism and bundled_gems.rb

Đang mở
#44 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
HTML
Star
32
Fork
5
Merge trung bình
14 giờ 17 phút
Pull request đã merge (30 ngày)
1

Mô tả

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

  1. Install ruby with sudo snap install ruby --classic
  2. gem install rails, which by default goes into ~/.gem
  3. Running rails new store will display bin/rails aborted! and a stacktrace that I'll paste below
  4. The project does get created, but running any of the following will crash with a similar stacktrace:
  • bin/rails server
  • bin/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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện lỗi trên Ubuntu 24.04.3 bằng các lệnh snap, gem install và Rails được nêu, sau đó so sánh các đường dẫn stacktrace trong prism.rb và bundled_gems.rb với đường dẫn tải rubocop-ast. Công việc hoàn tất khi rails new, bin/rails server và bin/rails db:create chạy mà không có các cảnh báo Prism hoặc NameError.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rails, ruby, ubuntu
Lĩnh vực
devops, operating-systems
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.