Closed rizkysyazuli closed 6 years ago
This is because the Atom terminal does not use the same environment as your normal Terminal. Run source ~/.bash_profile
and it should behave more like the real Terminal.
Are there any plans to make it act more like the normal terminal? Sourcing my bash profile every time I open a terminal tab defeats the quick in and out workflow I was hoping for.
Are you wanting them to mimic exactly?
I've added this to my .bash_profile
:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export PATH="$PATH:$HOME/.rvm/gems/ruby-2.1.1/bin"
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
and this to my .bashrc
:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export PATH=$PATH:$HOME/usr/local/bin
export PATH=$PATH:$HOME/usr/bin
Set up like that, I can quickly call rvm use your_version_here
from either terminal, but it doesn't mirror.
@anthonator i've fixed the problem. add that line: source ~/.bash_profile
inside your .bashrc
file. this should run that command everytime you open a new terminal window.
@rizkysyazuli Won't that escalate all non-login Bash shells to login? I'm new to all this, so I may be wrong....
@forgot i'm not the expert on that as well, but isn't it the other way around? the .bash_profile
is run at login, while .bashrc
is for new terminal window (see here).
in plain english: as far as i know, we're calling all login scripts again when opening a new terminal window.
and i took example from @mathiasbynens .bashrc
file. if he's doing it, i suppose it's okay :smile:
Nice work! This was super helpful.
@rizkysyazuli Perfect! Thanks for the tip.
This may be useful as part of the README or wiki. I imagine other's would find this useful.
Try this https://atom.io/packages/000-project-shell-env
Can confirm it works on Mac OSX
All repositories in the atom-archive organization are unmaintained and deprecated. Because of this, we are archiving this repository and closing all issues and pull requests. Thanks very much for your support and contributions!
Atom Terminal uses the system built-in Ruby. But it's supposed to use the version i install via RVM.
Running
ruby -v
from Terminal:And from Atom Terminal:
I found this when i tried to run Compass via Grunt. I got this warning message:
FYI: the Git version i install via Homebrew is not detected as well. reverts to system default Git.