For me the problem was that I hadn't properly re-initialized rbenv after installing and switching to the new ruby version.
In my shell config I had an incorrect check to avoid executing source (rbenv init -|psub) if rbenv wasn't installed. After manually sourcing it worked again.