via a login shell:
deploy@jgp-dev01:~$ cat test.sh
which bundle
deploy@jgp-dev01:~$ /usr/local/bin/rvm-shell test.sh
/usr/local/rvm/gems/ruby-1.8.7-p330@ci/bin/bundle
via hudson:
[workspace] $ /usr/local/bin/rvm-shell 1.8.7@ci /tmp/hudson8555917946525882045.sh
/usr/bin/bundle
where the first line of the /tmp/ script is 'which bundle'
Fixed - rogue per-user .rvm directories are bad.