I keep getting this error:
bash: ~/.bash_profile: No such file or directory
Here is my bash_profile:
alias ngrok=/Users/mmahalw
Bash has ~/.profile
instead of ~/.bash_profile
Content of ~/.profile
:
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
In my case I was receiving the following error.
-bash: /Users/mac241/.rvm/scripts/rvm: No such file or directory
-bash: /Users/mac241/.rvm/scripts/rvm: No such file or directory
After few checks, I got to know when I created .bash_profile
file, below two commands already was prewritten on the file.
source /Users/mac241/.rvm/scripts/rvm
source /Users/mac241/.rvm/scripts/rvm
based on error, I got to know this are the problems and after I removed, It started working. Hope you are written and defined those commands only which you required to auto run up on shell start.
Just go use ~./profile
instead of ~./bash_profile
This solved my problem, hope it solves yours too
UPDATE
The problem was a trailing "~/.bash_profile" 38L, 1070C which I had copied by mistake from vim. Thanks for the help!