gpt4 book ai didi

debugging - Ruby-Rubocop无法在vscode上运行

转载 作者:行者123 更新时间:2023-12-04 15:29:56 26 4
gpt4 key购买 nike

/Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems.rb:289:in ``find_spec_for_exe': can't find gem rubocop (>= 0.a) with executable rubocop (Gem::GemNotFoundException) from /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems.rb:308:in ``activate_bin_path' from /Users/me/.rbenv/versions/2.5.1/bin/rubocop:23:in'

这是我每次输入内容时都会遇到的错误。有谁知道如何解决这个问题?

最佳答案

经过数小时的苦苦挣扎并阅读了其他解决方案后,我最终推断出答案是从根本上安装Rubocop。当我尝试以下步骤。
您首先需要进入终端的根目录。
安装Rubocop然后找到路径并将其添加到Rubocop设置中的执行路径

$ cd ~
$ gem install rubocop
$ which rubocop
Paste location given in Ruby-Rubocop configuration settings > Execute Path
/Users/username/.rvm/gems/ruby-2.6.1/bin/

关于debugging - Ruby-Rubocop无法在vscode上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50401191/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com