vscode error: typeprof running on wrong ruby
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
Piste de recherche
Commencez dans vscode/src/extension.ts autour des lignes 72-83, où l’issue indique que TypeProf est lancé via Bundler, et comparez avec le point d’entrée de l’extension steep-vscode liée. Reproduisez la configuration chruby/VSCode, puis vérifiez que TypeProf utilise le Ruby sélectionné avant l’ouverture du projet plutôt que le Ruby système ; l’erreur signalée ne devrait plus faire référence au chemin du Ruby système.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Ruby
- Étoiles
- 833
- Forks
- 99
- Merge moyen
- 9 h 30 min
- PR mergées (30 j)
- 12
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ruby/typeprof
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 28/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
-
invalid option: --init Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 38/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 30/100
Toutes les issues de ruby/typeprof
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
simp/pupmod-simp-simp#395 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
simp/pupmod-simp-rsyslog#219 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
simp/pupmod-simp-pupmod#256 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
simp/pupmod-simp-sudo#150 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100