运行此命令时,例如
$ gem install af --no-rdoc --no-ri
打印出此错误:
ERROR: Could not find a valid gem '/usr/local/bin' (>= 0) in any repository
已经研究过,没有链接/帖子/评论在这里真有帮助。这里有一些事实:
$ gem --version
2.6.14
$ rvm list
=* ruby-2.4.2 [ x86_64 ]
$ gem list
*** LOCAL GEMS ***
(empty)
此外,当我尝试获取宝石环境变量时,我收到此错误
$ gem env
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown environment option [/usr/local/bin]
.gemrc的内容是
$ cat .gemrc
---
:backtrace: false
:bulk_threshold: 1000
:sources:
- https://rubygems.org/
:update_sources: true
:verbose: true
gem: "/usr/local/bin"
任何想法可以是什么?真的很奇怪......
答案 0 :(得分:1)
gem: "/usr/local/bin"
是一个糟糕的条目。删除它有助于:)