betelgeuse@pena ~/test/gentoo-bundler $ bundle exec rake /usr/lib/ruby/site_ruby/1.8/rubygems.rb:335:in `bin_path': can't find executable bundle for bundler-1.0.3 (Gem::Exception) from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/runtime.rb:126:in `setup_environment' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/runtime.rb:13:in `setup' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler.rb:100:in `setup' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/cli.rb:339:in `exec' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in `send' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in `run' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor.rb:246:in `dispatch' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/base.rb:389:in `start' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/bin/bundle:18 from /usr/bin/bundle:8:in `load' from /usr/bin/bundle:8 betelgeuse@pena ~/test/gentoo-bundler $ cat Gemfile source :gemcutter gem 'rake'
I can reproduce this. The good news is that bundler 1.0.7 appears to have a feature for this that fails, so I can't add that until this is fixed :-)
This happens because we don't record the list of executables for a gem in the gemspec file that we install, and this is the only mechanism that bundler uses to find it's own executable.
This is fixed with bundler-1.0.7-r1. Actually the fix is in the eclass which now installs the gemspec file as distributed in the gem, instead of our own version.