# Running .bash\_login everytime

**URL:** <https://www.ruby-forum.com/t/running-bash-login-everytime/55482>\
**Category:** Rails\
**Created:** [March 21, 2006, 4:32pm UTC](https://www.ruby-forum.com/t/running-bash-login-everytime/55482 "2006-03-21T16:32:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 21, 2006, 4:32pm UTC](https://www.ruby-forum.com/t/running-bash-login-everytime/55482/1 "2006-03-21T16:32:09Z")

</div>

i used

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

to install ruby on rails on my mac. everything works fine unless i close  
the terminal application. after a while of pulling my hair out, i found  
out that everytime i restart terminal, i have to run “. ~/.bash\_login”  
to make the paths work right. is that what i’m supposed to do everytme,  
or did i do something wrong?

i’m new to a lot of this stuff, so any help would be greatly  
appreciated.

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 21, 2006, 7:59pm UTC](https://www.ruby-forum.com/t/running-bash-login-everytime/55482/2 "2006-03-21T19:59:01Z")

</div>

Josh K. wrote:

> i used  
> [Dan Benjamin](http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger)  
> to install ruby on rails on my mac. everything works fine unless i close  
> the terminal application. after a while of pulling my hair out, i found  
> out that everytime i restart terminal, i have to run “. ~/.bash\_login”  
> to make the paths work right. is that what i’m supposed to do everytme,  
> or did i do something wrong?
> 
> i’m new to a lot of this stuff, so any help would be greatly  
> appreciated.

Two possibilities:

Do you have ~/.bash\_profile file? The contents of that file are  
preferred over the contents of ~/.bash\_login, so you need to combine the  
two and get rid of the other.

Move the relevant contents of ~/.bash\_login to ~/.bashrc The contents of  
.bash\_login are only sourced when bash is invoked as a login shell,  
although my limited testing on mac os x shows that most normal ways of  
opening a new terminal does source my .bash\_profile.

Ray

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 21, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/running-bash-login-everytime/55482/3 "2006-03-21T20:53:02Z")

</div>

> Two possibilities:
> 
> Do you have ~/.bash\_profile file? The contents of that file are  
> preferred over the contents of ~/.bash\_login, so you need to combine the  
> two and get rid of the other.
> 
> Move the relevant contents of ~/.bash\_login to ~/.bashrc The contents of  
> .bash\_login are only sourced when bash is invoked as a login shell,  
> although my limited testing on mac os x shows that most normal ways of  
> opening a new terminal does source my .bash\_profile.
> 
> Ray

I just checked that, niether one of those other files exist when I tried  
to edit them. I’m guessing another problem could be the actual location  
of the file, but I typed it just like it was on the previously mentioned  
tutorial.

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 21, 2006, 9:50pm UTC](https://www.ruby-forum.com/t/running-bash-login-everytime/55482/4 "2006-03-21T21:50:53Z")

</div>

Josh K. wrote:

> > Ray
> 
> I just checked that, niether one of those other files exist when I tried  
> to edit them. I’m guessing another problem could be the actual location  
> of the file, but I typed it just like it was on the previously mentioned  
> tutorial.

The file ~/.bash\_login is in your home directory. That’s what the “~”  
means. What’s the result of typing

ls -l ~/.bash\_login

in the Terminal?

–

Ray

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 21, 2006, 11:13pm UTC](https://www.ruby-forum.com/t/running-bash-login-everytime/55482/5 "2006-03-21T23:13:57Z")

</div>

that’s what i get:

-rw-r–r-- 1 name name 72 Mar 20 08:44 /Users/name/.bash\_login
