Forum: Ruby on Rails Bash

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0cbff4df9c92e95f57a0b3baacb86c37?d=identicon&s=25 Ron Green (Guest)
on 2006-03-29 04:21
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?
0cbff4df9c92e95f57a0b3baacb86c37?d=identicon&s=25 Ron Green (Guest)
on 2006-03-29 04:47
Ron Green 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.
2899cec9af525f7953e19c8210aca97c?d=identicon&s=25 Jason Perkins (Guest)
on 2006-03-29 04:57
(Received via mailing list)
On Mar 28, 2006, at 8:21 PM, Ron Green 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>

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 Perkins
jperkins@sneer.org

"The key to performance is elegance, not
  battalions of special cases."
  - Jon Bentley and Doug McIlroy
0cbff4df9c92e95f57a0b3baacb86c37?d=identicon&s=25 Ron Green (Guest)
on 2006-03-29 15:49
Jason Perkins 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 Perkins
> jperkins@sneer.org
>
> "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.
This topic is locked and can not be replied to.