vscode error: typeprof running on wrong ruby
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Bắt đầu trong vscode/src/extension.ts, khoảng các dòng 72-83, nơi issue báo cáo rằng TypeProf được khởi chạy thông qua Bundler, và so sánh với điểm vào của extension steep-vscode được liên kết. Tái tạo thiết lập chruby/VSCode, sau đó xác minh rằng TypeProf sử dụng Ruby được chọn trước khi mở project thay vì Ruby của hệ thống; lỗi được báo cáo không còn được tham chiếu đến đường dẫn Ruby của hệ thống.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi, I have a local setup using chruby (shouldn't be much different from other setups). I usually switch to the right ruby then open the project on VSCode via code ., in order to make sure that the extensions use the right ruby and deps versions. This works well for the steep plugin. However, the typeprof plugin picks up the wrong ruby, i.e. the system ruby. So, I switch to ruby 3, but I get the following error output from within vscode:
[vscode] Try to start TypeProf for IDE
[vscode] stderr: /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.2.15) required by your /Users/tiago.cardoso/dev/jwt-token-kms/Gemfile.lock. (Gem::GemNotFoundException)
[vscode] stderr: To update to the latest version installed on your system, run `bundle update --bundler`.
[vscode] stderr: To install the missing version, run `gem install bundler:2.2.15`
[vscode] stderr: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
[vscode] stderr: from /usr/bin/bundle:23:in `<main>'
[vscode] failed to invoke typeprof: error code 1
# that's the location from system ruby, not ruby 3
I suspect I'm entering this path, where the extensions recognizes the existence of a Gemfile, and runs typeprof via bundler, but picks up the wrong bundler. And this might be so because typeprof's not picking up the ruby defined by the VSCode ruby plugin, which I set to ruby (should have been ruby 3). steep does this a bit differently, but can't figure out what's the correct way to patch typeprof's command.
- Ngôn ngữ chính
- Ruby
- Star
- 833
- Fork
- 99
- Merge trung bình
- 9 giờ 30 phút
- Pull request đã merge (30 ngày)
- 12
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ruby/typeprof
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
invalid option: --init Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
Tất cả issue của ruby/typeprof
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
palladius/rails8-app-on-gcp#145 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
riscv/riscv-unified-db#2624 · 1 reaction ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100