I have rvemv installed but every time I close terminal I'm required to execute exec $SHELL for it to reload rvemv otherwise I get an error that rbemv is not installed. How can I fix this so I don't need to execute exec $SHELL?

This is also included in my .bashrc:

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

This is a common issue. You should place them in ~/.profile instead of ~/.bashrc.

NOTE: Make sure you don't have ~/.bash_profile otherwise ~/.profile will NOT be loaded by bash. This is Ubuntu Desktop default behaviour.

Alternatively, you can use an external script for rbenv, whenever needed, source it manually;-)

For example, rbenv.sh

#! /bin/sh
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.