# Bash

**URL:** <https://www.ruby-forum.com/t/bash/89721>\
**Category:** Rails\
**Created:** [March 29, 2006, 4:21am UTC](https://www.ruby-forum.com/t/bash/89721 "2006-03-29T04:21:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f04885/32.png) [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Post date:** [March 29, 2006, 4:21am UTC](https://www.ruby-forum.com/t/bash/89721/1 "2006-03-29T04:21:49Z")

</div>

I have installed Ruby and Rails on my Intel iMac according to the  
instructions provided by Hivelogic. Everything works perfectly.  
I have noticed that if I close Terminal and later come back and open it,  
It seems like the paths set in bash\_login are lost. If I open bash\_login  
the paths are still there however if i do ruby -v it says I am running  
1.8.2 (mac default) when I have installed 1.8.4. If I run .  
~/.bash\_login, everything is fine and ruby -v now shows I am running  
1.8.4.

Why do I have to keep running this command everytime I want work on my  
rails app?

---

<div class="post-metadata">

**Author:** ![rgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f04885/32.png) [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Post date:** [March 29, 2006, 4:47am UTC](https://www.ruby-forum.com/t/bash/89721/2 "2006-03-29T04:47:48Z")

</div>

Ron G. wrote:

> I have installed Ruby and Rails on my Intel iMac according to the  
> instructions provided by Hivelogic. Everything works perfectly.  
> I have noticed that if I close Terminal and later come back and open it,  
> It seems like the paths set in bash\_login are lost. If I open bash\_login  
> the paths are still there however if i do ruby -v it says I am running  
> 1.8.2 (mac default) when I have installed 1.8.4. If I run .  
> ~/.bash\_login, everything is fine and ruby -v now shows I am running  
> 1.8.4.
> 
> Why do I have to keep running this command everytime I want work on my  
> rails app?

Nevermind.  
After some searching it looks like the two lines added to bash\_login  
needed to be added to .profile instead.

Sorry if you wasted any time reading this.

---

<div class="post-metadata">

**Author:** ![rgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f04885/32.png) [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Post date:** [March 29, 2006, 4:57am UTC](https://www.ruby-forum.com/t/bash/89721/3 "2006-03-29T04:57:33Z")

</div>

On Mar 28, 2006, at 8:21 PM, Ron G. wrote:

> Why do I have to keep running this command everytime I want work on my  
> rails app?

This has come up before on the list - can you check for the existence  
of ~/.bash\_profile and let us know if it exists? From what I’m  
reading at:

[http://www.sfu.ca/~jpsember/osx.html](http://www.sfu.ca/~jpsember/osx.html)

bash will source ~/.bash\_profile, ~/.bash\_login or ~/.profile,  
whichever is found first. If you have a ~/.bash\_profile and that  
source is correct, then bash may simply not be getting around to  
reading your ~/.bash\_login. If you do have a ~/.bash\_profile then  
please add the line:

source ~/.bash\_login

to the end of your file and then start a new terminal session and  
type echo $PATH and see if it includes the directories added to your  
path in your ~/.bash\_login.

–  
Jason P.  
removed\_email\_address@domain.invalid

“The key to performance is elegance, not  
battalions of special cases.”

- Jon Bentley and Doug McIlroy

---

<div class="post-metadata">

**Author:** ![rgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f04885/32.png) [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Post date:** [March 29, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/bash/89721/4 "2006-03-29T15:49:00Z")

</div>

Jason P. wrote:

> bash will source ~/.bash\_profile, ~/.bash\_login or ~/.profile,  
> whichever is found first. If you have a ~/.bash\_profile and that  
> source is correct, then bash may simply not be getting around to  
> reading your ~/.bash\_login. If you do have a ~/.bash\_profile then  
> please add the line:
> 
> source ~/.bash\_login
> 
> to the end of your file and then start a new terminal session and  
> type echo $PATH and see if it includes the directories added to your  
> path in your ~/.bash\_login.
> 
> –  
> Jason P.  
> removed\_email\_address@domain.invalid
> 
> “The key to performance is elegance, not  
> battalions of special cases.”
> 
> - Jon Bentley and Doug McIlroy

Since bash\_profile was empty I just removed it.  
Now everything is working again.  
thank yo very much for the information and your help.
