Aptana Studio 3 - Can't find .bashrc when I go to terminal
Just installed Aptana Studio 3 build 3.0.4.201108101506 on Mac OS X Snow Leopard. I created a new rails project from existing source. When I open a terminal or choose "Run Server" or "Rails console", it opens a terminal in the directory of the application (expected), but gives the message:
bash: .bashrc: No such file or directory
If I source the .bashrc开发者_StackOverflow中文版 that is in my home directory, then everything begins to work fine.
How can I instruct Aptana to do this for me automatically? I've searched and can't seem to find anyone with a similar problem, so maybe there is a configuration issue.
Looks like we're not sourcing .bashrc, which according to bash manual seems correct: http://stefaanlippens.net/bashrc_and_others
As a workaround you can create a ~/.aptanarc file that sources .bashrc. But ideally you'd move the RVM lines into your .bash_profile since that's something we do source and is the preferred location for it according to RVM docs: http://beginrescueend.com/rvm/install/
For reference, here's what we currently run when we start the shell on Mac:
unset BASH_ENV
if [ -f /etc/profile ] ; then . /etc/profile; fi
if [ -f ~/.bash_profile ] ; then . ~/.bash_profile;
elif [ -f ~/.bash_login ] ; then . ~/.bash_login;
elif [ -f ~/.profile ] ; then . ~/.profile;
fi
if [[ $LANG == "" ]] ; then
export LANG=en_US.UTF-8
fi
if [[ "$HOME" != `pwd` ]] ; then
[[ -f .rvmrc && -n $rvm_version ]] && source .rvmrc
fi
[[ -f ~/.aptanarc ]] && . ~/.aptanarc
精彩评论