简体   繁体   English

无法运行`bundle install`

[英]Cannot run `bundle install`

So the other day I ran into an extreme hard disk issue and had to manually delete my .gem folder. 所以前几天我遇到了极端的硬盘问题,不得不手动删除我的.gem文件夹。 I attempted to rebuild the gems for my apps by going into my project folders to run bundle install ... I am unfortunately running into this error: 我试图通过进入我的项目文件夹来重建我的应用程序的宝石来运行bundle install ...我很遗憾地遇到了这个错误:

/home/xxx/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler (LoadError)
    from /home/xxx/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/bin/bundle:7:in `<main>'

By the way, line 54 of kernel_require.rb is return gem_original_require(path) : 顺便说一句,kernel_require.rb的第54行是return gem_original_require(path)

if Gem::Specification.unresolved_deps.empty? then
  RUBYGEMS_ACTIVATION_MONITOR.exit
  return gem_original_require(path)
end

Since you deleted the ".gem" folder, your Bundler gem is also not present. 由于您删除了“.gem”文件夹,因此Bundler gem也不存在。

Try reinstalling the Bundler gem first by using 首先尝试使用重新安装Bundler gem

gem install bundler

then you can run 然后你就可以跑了

bundle install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM