9

So the other day I ran into an extreme hard disk issue and had to manually delete my .gem folder. 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:

/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):

if Gem::Specification.unresolved_deps.empty? then
  RUBYGEMS_ACTIVATION_MONITOR.exit
  return gem_original_require(path)
end
Abram
  • 39,950
  • 26
  • 134
  • 184

1 Answers1

24

Since you deleted the ".gem" folder, your Bundler gem is also not present.

Try reinstalling the Bundler gem first by using

gem install bundler

then you can run

bundle install
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Anant Kolvankar
  • 1,050
  • 9
  • 10
  • Also possibly related to: http://stackoverflow.com/questions/17334359/new-to-ruby-and-am-having-trouble-with-load-path – Todd Jan 19 '16 at 21:03