This took a while for me to work out, but essentially you need to remember two things:
- everything that needs to be prefixed with
rbenv exec
- and everything that can be needs to be prefixed with
bundle exec
as well
The downside to this is that you need to add rake to your Gemfile. Just running rbenv exec rake
will not work, for some reason.