gpt4 book ai didi

ruby - rake 中止!无法加载此类文件 -- yard

转载 作者:数据小太阳 更新时间:2023-10-29 07:08:11 26 4
gpt4 key购买 nike

我一直在尝试从源代码添加一个 vagrant 插件 ( https://github.com/schisamo/vagrant-omnibus )。我下载了它,进行了“捆绑安装”,一切顺利。但是当我执行“rake install”时,它显示了以下错误:

rake aborted!
cannot load such file -- yard

这是带有跟踪的完整错误日志:

rake aborted!
cannot load such file -- yard
/root/chef-solo-example/vagrant-omnibus-master/Rakefile:5:in `require'
/root/chef-solo-example/vagrant-omnibus-master/Rakefile:5:in `<top (required)>'
/usr/share/gems/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/usr/share/gems/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/share/gems/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/usr/share/gems/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/usr/share/gems/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/share/gems/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/usr/share/gems/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/usr/share/gems/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/share/gems/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/usr/share/gems/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/bin/rake:23:in `load'
/bin/rake:23:in `<main>'

这是 gem 列表:

*** LOCAL GEMS ***

archive-tar-minitar (0.5.2)
ast (1.1.0)
bigdecimal (1.2.0)
bundler (1.3.1)
chef (11.8.2)
chef-zero (1.7.2)
coderay (1.1.0)
diff-lcs (1.2.5)
erubis (2.7.0)
hashie (2.0.5)
highline (1.6.20)
io-console (0.4.2)
ipaddress (0.8.0)
json (1.7.7)
knife-solo (0.4.1)
librarian (0.1.0)
librarian-chef (0.0.2)
method_source (0.8.2)
mime-types (1.16)
mixlib-authentication (1.3.0)
mixlib-cli (1.4.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.3.0)
moneta (0.7.20, 0.7.0, 0.6.0)
net-http-persistent (2.8)
net-ssh (2.7.0)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0, 1.1)
ohai (6.20.0)
parser (2.0.0)
powerpack (0.0.9, 0.0.6)
pry (0.9.12.4)
psych (2.0.0)
puma (1.6.0)
rack (1.5.2)
rainbow (1.1.4)
rake (10.0.4)
rake-compiler (0.8.3)
rdoc (4.0.1)
rest-client (1.6.7)
rspec (2.14.1)
rspec-core (2.14.0)
rspec-expectations (2.14.0)
rspec-mocks (2.14.0)
rubocop (0.15.0)
slop (3.4.7)
systemu (2.6.0, 2.5.2)
thor (0.17.0)
yajl-ruby (1.1.0)
yard (0.8.7.3)

知道是什么导致了这个错误吗?

最佳答案

你应该使用 bundle exec to "run the command in context of the bundle" :

bundle exec rake install

如果这不起作用,可能是一个错误,而且 yard 甚至不在 Gemfile 中。临时解决方法是将此行手动添加到 Gemfile:

gem 'yard'

关于ruby - rake 中止!无法加载此类文件 -- yard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20651664/

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