Skip to main content

Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)

After installing Redmine 2.x I got this error:

*** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)) (process 16175):
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `materialize'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'

To solve this I run this command in the redmine application directory

/var/www/redmine/bundle install --path vendor/bundle

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) 
...

Deprecated: Function create_function() is deprecated in /home/elkano.org/blog/wp-content/plugins/seo-ultimate/includes/jlfunctions/arr.php on line 64