tmux itself will never set (or cancel) RBENV_VERSION. You have a little configuration that causes this.
I assume that RBENV_VERSION was installed when you started your tmux server, and now it is part of the tmux global environment (the base environment inherited by all processes running tmux). You can check it out
tmux show-environment -g | grep RBENV
If it is present there, you can delete it with this command:
tmux set-environment -gu RBENV_VERSION
If you often run tmux when RBENV_VERSION is already configured (and you do not want it to be sent "inside" tmux), you can add the above command to your ~/.tmux.conf file to make sure that it is cleared every time it starts server.
Another possibility is that it is part of your tmux โsession environmentโ; this environment is โsuperimposedโ on top of the global environment to form an environment that is inherited by processes running for new windows and panels in the session. You can verify this with this command (run it inside the session or add -t sessname to indicate the session):
tmux show-environment | grep RBENV
If this is present, you can disable it in the same way:
tmux set-environment -u RBENV_VERSION
Finally, if the variable is not present in either the global or the session environment, then it probably comes from something in the shell initialization files. By default, tmux launches login shells, so be sure to check the corresponding shell configuration bits (e.g. .bash_profile , .bash_login , .profile , etc.), as well as any other initialization bits.
Chris johnsen
source share