Could not find rake-0.8.7 in any of the sources

After upgrading my server to: Ubuntu server 10.10 Ruby 1.9.2 Rails 3.0.1 Passenger 3.0.0 rake is unable to find itself:

rake -T

Could not find rake-0.8.7 in any of the sources Try running `bundle install`.

but `gem list` and 'bundle list' shows that rake-0.8.7 is installed!

When loading the webapp in the browser: Could not find rake-0.8.7 in any of the sources (Bundler::GemNotFound)

Ruby 1.8.7 is also installed on this server, but the following symbolic links have been created in '/usr/bin': ln -s ruby1.9.1 ruby ln -s ri1.9.1 ri ln -s rdoc1.9.1 rdoc ln -s gem1.9.1 gem ln -s irb1.9.1 irb ln -s rake1.9.1 rake

/var/lib/gems/1.9.1/bin is in the $PATH.

Running rake in my home folder, with a minimal Rakefile, works!

Any suggestions?

Best regards Bo Frederiksen.

Solved!

In the top of '/usr/bin/bundle' it said: #!/usr/bin/ruby1.8

I replaced it with: #!/usr/bin/env ruby

now bundler and rake works again.

Best regards Bo Frederiksen.