vscode error: typeprof running on wrong ruby
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
Rechercherichtung
Beginnen Sie in vscode/src/extension.ts ungefähr bei den Zeilen 72–83, wo im Issue berichtet wird, dass TypeProf über Bundler gestartet wird, und vergleichen Sie den verlinkten Einstiegspunkt der steep-vscode-Erweiterung. Reproduzieren Sie das chruby/VSCode-Setup und überprüfen Sie anschließend, dass TypeProf das Ruby verwendet, das vor dem Öffnen des Projekts ausgewählt wurde, und nicht das System-Ruby; der gemeldete Fehler sollte nicht mehr auf den Pfad des System-Rubys verweisen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Ruby
- Sterne
- 833
- Forks
- 99
- Ø Merge
- 9 Std. 30 Min.
- Gemergte PRs (30 T.)
- 12
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ruby/typeprof
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 28/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
-
invalid option: --init Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 38/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 30/100
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
googleapis/google-api-ruby-client#28001 · 5 Reaktionen ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100