Terminal: run source ~/.bash_profile every time start new terminal I installed some command line programs (e.g. rbenv), but every time I open a new Terminal tab, it looks like the environment gets reset. I need to source my .bash_profile manually:

source ~/.bash_profile


I followed some tutorials and put this code in my .bash_profile, but it doesn't work:

if [ -n "$BASH_VERSION" ] &amp;&amp; [ -f $HOME/.bashrc ];then
    source $HOME/.bashrc
fi


This doesn't happen on my old Mac, and I don't know how to configure this.
If you are using oh-my-zsh, 
the default one that will be loaded automatically is ~/.zshrc. All you need to do is adding the following at the end of ~/.zshrc:

if [ -f ~/.bash_profile ]; then
  . ~/.bash_profile
fi