Search code examples
rubyrubygemsjekyll

Bundle gem load error in Ruby


Attempting to install a theme for Jekyll while learning Jekyll/Ruby from scratch, I messed up something. Now I get an error message whenever I execute bundle. Anyone know how to fix?

$ bundle -v
/usr/local/bin/bundle:23:in `load': cannot load such file -- 
/usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle (LoadError)
    from /usr/local/bin/bundle:23:in `<main>'

There are many mentions to the error in the web, but also a general lack of consistency in answers/suggestions.

I went ahead and

  1. apt-get --purge autoremove ruby
  2. erased /var/lib/gems/
  3. apt-get install ruby
  4. apt-get install ruby-dev
  5. gem install jekyll

but problem persists.

Is the issue perhaps akin to this, with similar solution?

Some relevant info:

$ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
$ gem list
*** LOCAL GEMS ***
...
bundler (default: 1.16.1)
...

Running ubuntu 16.04.


Solution

  • Try this $ gem update --system 2.7.4