Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 -)"
share|improve this question

1 Answer 1

up vote 1 down vote accepted

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 -)"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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