I am having the same problem. There is no file on my Macbook
named .bash_profile. Should I just create one and add that single line
to it? Where should I put the file?
I am having the same problem. There is no file on my Macbook
named .bash_profile.
Are you sure? Files whose names start with a period do not display in
the Finder, nor with ls unless you specify the -a option
Should I just create one and add that single line
to it?
Yes.
Where should I put the file?
Where a .bash_profile normally goes.
Yes, I know that was slightly snarky and unsatisfying. The profile file
is an important part of using bash (or indeed any *nix shell)
effectively. If you don't know the answer to this question, then I
would recommend reading some docs on how bash works.
The reason I'm not giving you a direct answer here is that if I do, it
will just raise more questions. You need a good overview of the beast
as a whole.
Yes, I am sure the file isn't there. I altered the default view to
show hidden files before I went searching for it.
Yes, I need a "good overview of the beast as a whole". One has to
start asking questions somewhere. I chose here. I am happy to go find
out where to put .bash_profile but first I need to know if creating
such a file is the answer. Is it the answer?
So, since this is as good a place for others to search for answers as
anywhere else, I offer my (limited) experience. I created a file
named .bash_profile, entered the line required from the RVM
installation page, and loaded it in my root. That didn't work. So I
loaded it in my user folder (in my case /Users/ken -- my name is
Kenneth). *That* worked. The command 'rvm list' now returns something
other than "command not found".
Yes, I am sure the file isn't there. I altered the default view to
show hidden files before I went searching for it.
That may or may not do the trick. Mac OS has a way of hiding files (by
setting metadata) that has nothing to do with beginning names with a
period. Showing hidden files in the Finder will show files hidden with
metadata, I think, but not necessarily files whose names begin with a
period. I'm not certain, though.
Yes, I need a "good overview of the beast as a whole". One has to
start asking questions somewhere. I chose here.
My apologies, Marnen, I missed the "Yes". Thank you for the bash
reference pages, I am sure that will help. Keep in mind I did not yet
know this was a bash problem when I asked the question.
Regarding finding hidden files on a Mac, I also used the terminal
commands 'ls -a' in all the likely folders and 'find / -name
'.bash_profile' '. It wasn't anywhere to be found.