3

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 -)"
papukaija
  • 2,425
kurupt_89
  • 133

1 Answers1

6

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 -)"
Terry Wang
  • 9,775