Hello, So, I have something happening that I don''t understand. I am on OS 10.5.6 and followed Dan Benjamin''s (Hivelogic) advice on how to install Ruby, MySQL.... As he suggests, I added . ~/.bash_login with the path for the MySQL installation. I also added . ~/.profile with the path for the Ruby installation. Now, when I start Terminal and run: % ruby -v # -> version 1.8.6 % gem list # -> I get a list with various versions of active record, actionmailer, rake and... no mysql (2.7) gem Then if I run: % . ~/.profile % ruby -v # -> version 1.8.7 % gem list # Get updated gem list including mysql gem But if I close that terminal window and open a new one -- the above is reset. Why does that happen? and how do I get the path to load automatically? Thanks, Elle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Mar 18, 2009 at 4:47 PM, elle <waznelle-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello, > > So, I have something happening that I don''t understand. I am on OS > 10.5.6 and followed Dan Benjamin''s (Hivelogic) advice on how to > install Ruby, MySQL.... As he suggests, I added . ~/.bash_login with > the path for the MySQL installation. I also added . ~/.profile with > the path for the Ruby installation. > > Now, when I start Terminal and run: > % ruby -v # -> version 1.8.6 > % gem list # -> I get a list with various versions of active record, > actionmailer, rake and... no mysql (2.7) gem > > Then if I run: > % . ~/.profile > % ruby -v # -> version 1.8.7 > % gem list # Get updated gem list including mysql gem > > But if I close that terminal window and open a new one -- the above is > reset. > > Why does that happen? and how do I get the path to load automatically?Try putting this stuff in a file called .bashrc. -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
elle wrote:> Hello, > > So, I have something happening that I don''t understand. I am on OS > 10.5.6 and followed Dan Benjamin''s (Hivelogic) advice on how to > install Ruby, MySQL.... As he suggests, I added . ~/.bash_login with > the path for the MySQL installation. I also added . ~/.profile with > the path for the Ruby installation. > > Now, when I start Terminal and run: > % ruby -v # -> version 1.8.6 > % gem list # -> I get a list with various versions of active record, > actionmailer, rake and... no mysql (2.7) gem > > Then if I run: > % . ~/.profile > % ruby -v # -> version 1.8.7 > % gem list # Get updated gem list including mysql gem > > But if I close that terminal window and open a new one -- the above is > reset. > > Why does that happen? and how do I get the path to load automatically?Put the settings ~/.bash_profile --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 19, 9:01 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote:> elle wrote: > > Hello, > > > So, I have something happening that I don''t understand. I am on OS > > 10.5.6 and followed Dan Benjamin''s (Hivelogic) advice on how to > > install Ruby, MySQL.... As he suggests, I added . ~/.bash_login with > > the path for the MySQL installation. I also added . ~/.profile with > > the path for the Ruby installation. > > > Now, when I start Terminal and run: > > % ruby -v # -> version 1.8.6 > > % gem list # -> I get a list with various versions of active record, > > actionmailer, rake and... no mysql (2.7) gem > > > Then if I run: > > % . ~/.profile > > % ruby -v # -> version 1.8.7 > > % gem list # Get updated gem list including mysql gem > > > But if I close that terminal window and open a new one -- the above is > > reset. > > > Why does that happen? and how do I get the path to load automatically? > > Put the settings ~/.bash_profileMy ~/.profile has: export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin: $PATH" And my ~/.bash_profile has the following: -------------- for a in local $(ls /opt/ | grep -v local | grep -v gentoo); do FULLPATH=/opt/$a if [ -x $FULLPATH ]; then if [ -x $FULLPATH/bin ]; then export PATH="$FULLPATH/bin:$PATH" fi if [ -x $FULLPATH/sbin ]; then export PATH="$FULLPATH/sbin:$PATH" fi if [ -x $FULLPATH/share/aclocal ]; then export ACLOCAL_FLAGS="-I $FULLPATH/share/aclocal $ACLOCAL_FLAGS" fi if [ -x $FULLPATH/man ]; then export MANPATH="$FULLPATH/man:$MANPATH" fi if [ -x $FULLPATH/share/man ]; then export MANPATH="$FULLPATH/share/man:$MANPATH" fi if [ -x $FULLPATH/lib/pkgconfig ]; then export PKG_CONFIG_PATH="$FULLPATH/lib/pkgconfig/: $PKG_CONFIG_PATH" fi fi done # Setting PATH for Subversion 1.5.1 binaries # The orginal version is saved in .bash_profile.svnsave PATH="/opt/subversion/bin:${PATH}" export PATH -------------------- What rules should I add to it? and where do I add them? Elle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
elle wrote:> My ~/.profile has:...> And my ~/.bash_profile has the following:...> What rules should I add to it? and where do I add them?You want either a .profile or a .bash_profile, not both. Once bash sees the .bash_profile, it won''t look for the .profile; that''s why you''re having to source it manually. From bash(1): When bash is invoked as an interactive login shell, or as a non-inter- active shell with the --login option, it first reads and executes com- mands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. I actually prefer just to have a .profile, but if you have to support other sh-derivatives, .bash_profile lets you play it safe. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
elle wrote:>>> I am on OS 10.5.6> And my ~/.bash_profile has the following:> for a in local $(ls /opt/ | grep -v local | grep -v gentoo); doYou have an /opt/gentoo directory on Mac OS X? If you''ve got emerge working, I''d love to know how. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 19, 9:27 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote:> elle wrote: > > My ~/.profile has: > > ... > > > And my ~/.bash_profile has the following: > > ... > > > What rules should I add to it? and where do I add them? > > You want either a .profile or a .bash_profile, not both. Once bash sees > the .bash_profile, it won''t look for the .profile; that''s why you''re > having to source it manually. From bash(1): > > When bash is invoked as an interactive login shell, or as a > non-inter- active shell with the --login option, it first > reads and executes com- mands from the file /etc/profile, > if that file exists. After reading that file, it looks for > ~/.bash_profile, ~/.bash_login, and ~/.profile, in that > order, and reads and executes commands from the first one > that exists and is readable. > > I actually prefer just to have a .profile, but if you have to support > other sh-derivatives, .bash_profile lets you play it safe.Thank you for explaining. Just to verify that my path will be set correctly, I should change: PATH="/opt/subversion/bin:${PATH}" export PATH to PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/ subversion/bin:${PATH}" export PATH is that correct? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 19, 9:29 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote:> elle wrote: > >>> I am on OS 10.5.6 > > And my ~/.bash_profile has the following: > > for a in local $(ls /opt/ | grep -v local | grep -v gentoo); do > > You have an /opt/gentoo directory on Mac OS X? If you''ve got emerge > working, I''d love to know how.No /opt/gentoo directory. Only /opt/subversion and /opt/git Sorry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
elle wrote:> > > On Mar 19, 9:27 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: >> elle wrote: >>> My ~/.profile has: >> ... >> >>> And my ~/.bash_profile has the following: >> ... >> >>> What rules should I add to it? and where do I add them? >> You want either a .profile or a .bash_profile, not both. Once bash sees >> the .bash_profile, it won''t look for the .profile; that''s why you''re >> having to source it manually. From bash(1): >> >> When bash is invoked as an interactive login shell, or as a >> non-inter- active shell with the --login option, it first >> reads and executes com- mands from the file /etc/profile, >> if that file exists. After reading that file, it looks for >> ~/.bash_profile, ~/.bash_login, and ~/.profile, in that >> order, and reads and executes commands from the first one >> that exists and is readable. >> >> I actually prefer just to have a .profile, but if you have to support >> other sh-derivatives, .bash_profile lets you play it safe. > > Thank you for explaining. Just to verify that my path will be set > correctly, I should change: > > PATH="/opt/subversion/bin:${PATH}" > export PATH > > to > > PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/ > subversion/bin:${PATH}" > export PATH > > is that correct?No; there was no problem with what you had, just that you split it across two or three files. You only should have exactly one of .profile, .bash_profile, and .bash_login. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 19, 9:45 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote:> elle wrote: > > > On Mar 19, 9:27 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: > >> elle wrote: > >>> My ~/.profile has: > >> ... > > >>> And my ~/.bash_profile has the following: > >> ... > > >>> What rules should I add to it? and where do I add them? > >> You want either a .profile or a .bash_profile, not both. Once bash sees > >> the .bash_profile, it won''t look for the .profile; that''s why you''re > >> having to source it manually. From bash(1): > > >> When bash is invoked as an interactive login shell, or as a > >> non-inter- active shell with the --login option, it first > >> reads and executes com- mands from the file /etc/profile, > >> if that file exists. After reading that file, it looks for > >> ~/.bash_profile, ~/.bash_login, and ~/.profile, in that > >> order, and reads and executes commands from the first one > >> that exists and is readable. > > >> I actually prefer just to have a .profile, but if you have to support > >> other sh-derivatives, .bash_profile lets you play it safe. > > > Thank you for explaining. Just to verify that my path will be set > > correctly, I should change: > > > PATH="/opt/subversion/bin:${PATH}" > > export PATH > > > to > > > PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/ > > subversion/bin:${PATH}" > > export PATH > > > is that correct? > > No; there was no problem with what you had, just that you split it > across two or three files. You only should have exactly one of > .profile, .bash_profile, and .bash_login.Sorry to be difficult but I actually have all 3 files. Which should I delete? And then, what happens to the information within? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 19, 9:45 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote:> elle wrote: > > > On Mar 19, 9:27 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: > >> elle wrote: > >>> My ~/.profile has: > >> ... > > >>> And my ~/.bash_profile has the following: > >> ... > > >>> What rules should I add to it? and where do I add them? > >> You want either a .profile or a .bash_profile, not both. Once bash sees > >> the .bash_profile, it won''t look for the .profile; that''s why you''re > >> having to source it manually. From bash(1): > > >> When bash is invoked as an interactive login shell, or as a > >> non-inter- active shell with the --login option, it first > >> reads and executes com- mands from the file /etc/profile, > >> if that file exists. After reading that file, it looks for > >> ~/.bash_profile, ~/.bash_login, and ~/.profile, in that > >> order, and reads and executes commands from the first one > >> that exists and is readable. > > >> I actually prefer just to have a .profile, but if you have to support > >> other sh-derivatives, .bash_profile lets you play it safe. > > > Thank you for explaining. Just to verify that my path will be set > > correctly, I should change: > > > PATH="/opt/subversion/bin:${PATH}" > > export PATH > > > to > > > PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/ > > subversion/bin:${PATH}" > > export PATH > > > is that correct? > > No; there was no problem with what you had, just that you split it > across two or three files. You only should have exactly one of > .profile, .bash_profile, and .bash_login.Sorry, reread your post -- Just confused with an earlier sentence:>> You want either a .profile or a .bash_profile, not both.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
elle wrote:> > > On Mar 19, 9:45 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: >> elle wrote: >> >>> On Mar 19, 9:27 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: >>>> elle wrote: >>>>> My ~/.profile has: >>>> ... >>>>> And my ~/.bash_profile has the following: >>>> ... >>>>> What rules should I add to it? and where do I add them? >>>> You want either a .profile or a .bash_profile, not both. Once bash sees >>>> the .bash_profile, it won''t look for the .profile; that''s why you''re >>>> having to source it manually. From bash(1): >>>> When bash is invoked as an interactive login shell, or as a >>>> non-inter- active shell with the --login option, it first >>>> reads and executes com- mands from the file /etc/profile, >>>> if that file exists. After reading that file, it looks for >>>> ~/.bash_profile, ~/.bash_login, and ~/.profile, in that >>>> order, and reads and executes commands from the first one >>>> that exists and is readable. >>>> I actually prefer just to have a .profile, but if you have to support >>>> other sh-derivatives, .bash_profile lets you play it safe. >>> Thank you for explaining. Just to verify that my path will be set >>> correctly, I should change: >>> PATH="/opt/subversion/bin:${PATH}" >>> export PATH >>> to >>> PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/ >>> subversion/bin:${PATH}" >>> export PATH >>> is that correct? >> No; there was no problem with what you had, just that you split it >> across two or three files. You only should have exactly one of >> .profile, .bash_profile, and .bash_login. > > > Sorry to be difficult but I actually have all 3 files. > Which should I delete? > And then, what happens to the information within?Concatenate them. For example, something like: cp /dev/null profile for f in ~/.profile ~/.bash_login ~/.bash_profile do mv $f orig$f cat $f >> profile done mv profile ~/.profile --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeff Schwab wrote:> elle wrote: >> >> On Mar 19, 9:45 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: >>> elle wrote: >>> >>>> On Mar 19, 9:27 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: >>>>> elle wrote: >>>>>> My ~/.profile has: >>>>> ... >>>>>> And my ~/.bash_profile has the following: >>>>> ... >>>>>> What rules should I add to it? and where do I add them? >>>>> You want either a .profile or a .bash_profile, not both. Once bash sees >>>>> the .bash_profile, it won''t look for the .profile; that''s why you''re >>>>> having to source it manually. From bash(1): >>>>> When bash is invoked as an interactive login shell, or as a >>>>> non-inter- active shell with the --login option, it first >>>>> reads and executes com- mands from the file /etc/profile, >>>>> if that file exists. After reading that file, it looks for >>>>> ~/.bash_profile, ~/.bash_login, and ~/.profile, in that >>>>> order, and reads and executes commands from the first one >>>>> that exists and is readable. >>>>> I actually prefer just to have a .profile, but if you have to support >>>>> other sh-derivatives, .bash_profile lets you play it safe. >>>> Thank you for explaining. Just to verify that my path will be set >>>> correctly, I should change: >>>> PATH="/opt/subversion/bin:${PATH}" >>>> export PATH >>>> to >>>> PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/ >>>> subversion/bin:${PATH}" >>>> export PATH >>>> is that correct? >>> No; there was no problem with what you had, just that you split it >>> across two or three files. You only should have exactly one of >>> .profile, .bash_profile, and .bash_login. >> >> Sorry to be difficult but I actually have all 3 files. >> Which should I delete? >> And then, what happens to the information within? > > Concatenate them. For example, something like: > > cp /dev/null profile > for f in ~/.profile ~/.bash_login ~/.bash_profile > do > mv $f orig$f > cat $f >> profileWhoops, you''d have to swap those lines. Warning: I haven''t actually run this code.> done > mv profile ~/.profile--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 19, 10:14 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote:> Jeff Schwab wrote: > > elle wrote: > > >> On Mar 19, 9:45 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: > >>> elle wrote: > > >>>> On Mar 19, 9:27 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: > >>>>> elle wrote: > >>>>>> My ~/.profile has: > >>>>> ... > >>>>>> And my ~/.bash_profile has the following: > >>>>> ... > >>>>>> What rules should I add to it? and where do I add them? > >>>>> You want either a .profile or a .bash_profile, not both. Once bash sees > >>>>> the .bash_profile, it won''t look for the .profile; that''s why you''re > >>>>> having to source it manually. From bash(1): > >>>>> When bash is invoked as an interactive login shell, or as a > >>>>> non-inter- active shell with the --login option, it first > >>>>> reads and executes com- mands from the file /etc/profile, > >>>>> if that file exists. After reading that file, it looks for > >>>>> ~/.bash_profile, ~/.bash_login, and ~/.profile, in that > >>>>> order, and reads and executes commands from the first one > >>>>> that exists and is readable. > >>>>> I actually prefer just to have a .profile, but if you have to support > >>>>> other sh-derivatives, .bash_profile lets you play it safe. > >>>> Thank you for explaining. Just to verify that my path will be set > >>>> correctly, I should change: > >>>> PATH="/opt/subversion/bin:${PATH}" > >>>> export PATH > >>>> to > >>>> PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/ > >>>> subversion/bin:${PATH}" > >>>> export PATH > >>>> is that correct? > >>> No; there was no problem with what you had, just that you split it > >>> across two or three files. You only should have exactly one of > >>> .profile, .bash_profile, and .bash_login. > > >> Sorry to be difficult but I actually have all 3 files. > >> Which should I delete? > >> And then, what happens to the information within? > > > Concatenate them. For example, something like: > > > cp /dev/null profile > > for f in ~/.profile ~/.bash_login ~/.bash_profile > > do > > mv $f orig$f > > cat $f >> profile > > Whoops, you''d have to swap those lines. Warning: I haven''t actually run > this code. > > > > > done > > mv profile ~/.profileDid not work well. I changed it to the following: cp -p ~/.profile ~/.profile.orig cp -p ~/.bash_login ~/.bash_login.orig cp -p ~/.bash_profile ~/.bash_profile.orig cp /dev/null profile for f in ~/.profile ~/.bash_login ~/.bash_profile; do cat $f >> profile mv profile ~/.profile done What it did is, it placed .bash_profile content into .profile insetad of adding it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 19, 1:33 pm, elle <wazne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mar 19, 10:14 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: > > > > > > > Jeff Schwab wrote: > > > elle wrote: > > > >> On Mar 19, 9:45 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: > > >>> elle wrote: > > > >>>> On Mar 19, 9:27 am, Jeff Schwab <j...-0DHsjr3A8/m6BbymS3xAUA@public.gmane.org> wrote: > > >>>>> elle wrote: > > >>>>>> My ~/.profile has: > > >>>>> ... > > >>>>>> And my ~/.bash_profile has the following: > > >>>>> ... > > >>>>>> What rules should I add to it? and where do I add them? > > >>>>> You want either a .profile or a .bash_profile, not both. Once bash sees > > >>>>> the .bash_profile, it won''t look for the .profile; that''s why you''re > > >>>>> having to source it manually. From bash(1): > > >>>>> When bash is invoked as an interactive login shell, or as a > > >>>>> non-inter- active shell with the --login option, it first > > >>>>> reads and executes com- mands from the file /etc/profile, > > >>>>> if that file exists. After reading that file, it looks for > > >>>>> ~/.bash_profile, ~/.bash_login, and ~/.profile, in that > > >>>>> order, and reads and executes commands from the first one > > >>>>> that exists and is readable. > > >>>>> I actually prefer just to have a .profile, but if you have to support > > >>>>> other sh-derivatives, .bash_profile lets you play it safe. > > >>>> Thank you for explaining. Just to verify that my path will be set > > >>>> correctly, I should change: > > >>>> PATH="/opt/subversion/bin:${PATH}" > > >>>> export PATH > > >>>> to > > >>>> PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/ > > >>>> subversion/bin:${PATH}" > > >>>> export PATH > > >>>> is that correct? > > >>> No; there was no problem with what you had, just that you split it > > >>> across two or three files. You only should have exactly one of > > >>> .profile, .bash_profile, and .bash_login. > > > >> Sorry to be difficult but I actually have all 3 files. > > >> Which should I delete? > > >> And then, what happens to the information within? > > > > Concatenate them. For example, something like: > > > > cp /dev/null profile > > > for f in ~/.profile ~/.bash_login ~/.bash_profile > > > do > > > mv $f orig$f > > > cat $f >> profile > > > Whoops, you''d have to swap those lines. Warning: I haven''t actually run > > this code. > > > > done > > > mv profile ~/.profile > > Did not work well. > I changed it to the following: > > cp -p ~/.profile ~/.profile.orig > cp -p ~/.bash_login ~/.bash_login.orig > cp -p ~/.bash_profile ~/.bash_profile.orig > cp /dev/null profile > for f in ~/.profile ~/.bash_login ~/.bash_profile; do > cat $f >> profile > mv profile ~/.profile > done > > What it did is, it placed .bash_profile content into .profile insetad > of adding it.Solved. Both the ~/.profile and ~/.bash_login had the same path defined but did not load in login. Adding the path to ~/.bash_profile fixed the problem. Checked: which mysql which svn which git gem list and all is good. Half way through, I realised it wasn''t really a rails problem -- so, apologies for that. Hopefully, this will help someone else. Thanks, Elle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---