DevLuke
DevLuke

Reputation: 93

Bundle load error when invoking bundler

I'm trying to set up a ruby project and rather new to the process of automating via bundle. However when I try to execute any bundle command I'm met with the following error:

/usr/local/bin/bundle:26: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:26:in `<main>'

I have tried removing and reinstalling Ruby, as well as removing the bundler gem itself. But to no avail. My Rubygems version is 2.3.0 and the Ruby version is 2.3.1 which is the latest stable version for Ubuntu

Upvotes: 5

Views: 2152

Answers (2)

yrrgarten
yrrgarten

Reputation: 53

I was able to uninstall bundler -v '1.16.1' as described by Mr.Coffee, but in gem list it was still listed and marked as default.

I created a symlink then - very hacky, but the only thing which worked for me:

ln -sf /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.0 /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1

The gem requesting bundler works now.

Upvotes: 0

Mr.Coffee
Mr.Coffee

Reputation: 3876

Problem related to bundler==1.16.1 try to reinstall with bundler=1.16.0 for now.

gem uninstall bundler -x
gem install bundler -v 1.16.0 --force

More info and bug report can be found here: https://github.com/bundler/bundler/issues/6227

Upvotes: 6

Related Questions