我尝试使用ruby
gem
,但是一旦我尝试使用它们,他们会抱怨他们无法加载某个文件,例如:
/usr/local/lib/ruby/gems/2.3.0/gems/parslet-1.7.1/lib/parslet/context.rb:2:in `require': cannot load such file -- blankslate (LoadError)
from /usr/local/lib/ruby/gems/2.3.0/gems/parslet-1.7.1/lib/parslet/context.rb:2:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.3.0/gems/parslet-1.7.1/lib/parslet/transform.rb:257:in `require'
from /usr/local/lib/ruby/gems/2.3.0/gems/parslet-1.7.1/lib/parslet/transform.rb:257:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.3.0/gems/parslet-1.7.1/lib/parslet.rb:299:in `require'
from /usr/local/lib/ruby/gems/2.3.0/gems/parslet-1.7.1/lib/parslet.rb:299:in `<top (required)>'
我查看了该文件,违规行显示为:
require 'blankslate'
我安装了该库。当我尝试使用$:
全局变量添加文件时,下一个require
将抛出该错误,因此它继续...
造成这种情况的原因是什么?