I have installed rbenv on an Ubuntu sever. I can cd into my application directory and run $ bundle without issue, however I need to run $ sudo bundle exec
$ bundle
$ sudo bundle exec
Not entirely sure, but maybe this would work for you:
sudo -i -u $USER bundle exec...
or
sudo -i -u username_with_correct_env bundle exec...