remear / jewelrybox

OS X RVM Manager
105 stars 5 forks source link

Messed up env after install #178

Closed asimonet closed 11 years ago

asimonet commented 11 years ago

After installing on 10.8.2 and and selecting 2.0.0 as my default ruby, it looks like neither ~/.bashrc nor ~/.profile are run when I open a new terminal.

My $PATH is incomplete and identical to the one that the information tab of ruby-2.0.0-pO is showing, my aliases are not set, I get the default bash prompt etc.

remear commented 11 years ago

What version of RVM are you running and how was it installed? Via JewelryBox or command line?

asimonet commented 11 years ago

I'm runnnig rvm 1.18.15. I previously installed it by command line but had some problem, so I removed it, and installed it again with JewelryBox.

BTW, the problem that I used to have (missing .rvm/scripts/rvm) was fixed by Jewelry Box.

asimonet commented 11 years ago

Interesting fact: if I run bash within a new terminal, I get my correct environment back. How the bash run when the new terminal opens manages not to run my scripts remains a complete mystery though.

remear commented 11 years ago

Sounds like your profile scripts aren't set up properly. Remember that .bashrc is not loaded by default on OS X. .profile is not loaded in all type of terminal sessions. Also make sure your PATH is configured correctly.

asimonet commented 11 years ago

Well my .bashrc is loaded from my .profile, and my .profile used to be loaded by my shell. Can you elaborate on these different types of terminal sessions? I think that .profile should be run when I open a graphical terminal.

Also, did I mention that everything used to work fine before I installed JewelryBox?

remear commented 11 years ago

I really doubt JewelryBox messed up your environment since the only place it ever touches your profile is during an rvm install if you don't already have it installed, and you have to pick the file you want to use for loading rvm. There is no trickery performed here and it's left up to the user to properly configure their profile loading. You'll have to talk to the rvm team directly to find out if rvm itself now does more with your profiles. Here's a decent explanation of profile loading. http://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/

asimonet commented 11 years ago

Thanks, the link helped. I really don't know what to blame, but it seems that from now on, .bash_profile gets run instead of .profile. I have no idea why, not sure I want to know, just made .bash_profile source .profile which in turn sources .bashrc. Ugly but working :+1:

Thanks for your help.