0

I was following this tutorial https://gorails.com/setup/osx/10.13-high-sierra to download Rails.

Upon completed this tutorial, I noticed that my terminal's color code, alias, display format when doing "ls" are all messed up.

My .profile worked before and it is rather simple.

  1 alias alias1="Somalis"
  2 alias mysql="mysql -u root -p"
  3 export PATH=$PATH:/usr/local/mysql/bin
  4 alias py="python3"
  5 
  6 export CLICOLOR=1;
  7 export LSCOLORS=exfxcxdxbxegedabagacad;
  8 
  9 # Setting PATH for Python 3.6
 10 # The original version is saved in .profile.pysave
 11 PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
 12 export PATH

My .bash_profile is rather simple as well:

 if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

But apparently nothing in my .profile works after the installation.

1

From the bash manual:

When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior."

As stated if you have the file ~/.bash_profile then the file ~/.profile will not be read.

To fix, just run

cat .bash_profile >> .profile
rm .bash_profile

and open a new Terminal tab.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .