Skip to main content

bundle:2:in `require’: no such file to load — bundler (LoadError)

I installed Bundler gem during the Redmine installation

# gem install bundler
Successfully installed bundler-1.1.5
1 gem installed
Installing ri documentation for bundler-1.1.5...
Installing RDoc documentation for bundler-1.1.5...

And I got this error:

# bundle
/usr/bin/bundle:2:in `require': no such file to load -- bundler (LoadError)
	from /usr/bin/bundle:2

It seemed that it was not able to load required gem. I found required gem bundler.rb under “/var/lib/gems/1.8/gems/bundler-1.1.5/lib/”

# locate bundler.rb
/var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler.rb

As a workaround I edited the file /usr/bin/bundle and forced to load the required path:

#!/usr/bin/env ruby
$LOAD_PATH << "/var/lib/gems/1.8/gems/bundler-1.1.5/lib/"
require 'bundler'

And got it working

# bundle
Fetching gem metadata from http://rubygems.org/.......
Installing rake (0.9.2.2) 
Installing i18n (0.6.0) 
Installing multi_json (1.3.6) 
...