Today I was working on another teams project that is in ruby. To get my environment setup I had to install rbenv. When I first installed it I easily got a new version of ruby installed but whenever I tried to install a gem it would try to install on system ruby. I also realized that system ruby was being used instead of the ruby that I had installed with rbenv.
To fix this I had to add
eval "$(rbenv init -)" to my .zshrc.