/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。当我尝试时,以下步骤有效。
你首先需要去root在您的终端中。
安装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/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)