RVM on a Macbook

I have a Macbook with Snow Leopard and Macports. I have successfully
run the script displayed below the heading “The following script will
boostrap git + RVM…” on the page:

http://rvm.beginrescueend.com/rvm/install/

However I can find no .bash_profile or .bashrc on my machine. The
closest existing files are .profile in my root, .bash_login in my
root, and setup.bash.in in a subfolder of Macports. I have tried
adding:

[[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm” #
This loads RVM into a shell session.

to each of them but the result is the same after closing Terminal and
reopening it:

$ rvm list
-bash: rvm: command not found

Should I be creating a file and adding that line? If so, what should I
call it and where should I put it? Is there some other solution?

Remove the script loading line from any file you’ve put it in so far.

It needs to go in ~/.bashrc or ~/.bash_profile. If they aren’t there,
create them and put that line in there.

If you need more help, please visit the irc chat #rvm on freenode, as
this mailing list is designated for rails discussion and RVM is not
rails specific in any way.

You only need to use your .profile in your home directory. Once changed
you need to make sure you type . /.profile to reload it.

Have a look at my .profile

http://gist.github.com/606002

kenvogt wrote in post #949756:

However I can find no .bash_profile or .bashrc on my machine. The
closest existing files are .profile …

Using ~/.profile is fine AFAIK. It’s what I’ve always used on Mac OS X
and haven’t run into any problems with it yet. I suppose ~/.bash_profile
is a bit more specific when using bash as your default shell. I’m not
sure what other implications there may be to using the more generic
~/.profile, but as I said I’ve not run into any issues using it.

I have a Macbook with Snow Leopard and Macports.

This is just and FYI in case you haven’t yet heard of it, but I much
prefer Homebrew over Macports. I tried Macports a year or two ago and
was constantly frustrated by its invasive nature.

Homebrew feels much less intrusive to me. Maybe some people don’t mind a
package manager that wants to take over your machine, but I’m not one of
them.

You need to create a .bash_profile in root directory, which is usually
your name. Then once .bash_profile exists, if you use textmate, do: mate
.bash_profile and add this line:
source ~/.profile

And then it should work. That’s becuase .profile is what contains the
path and you are just pointing to it from .bash_profile.

Thank you for the Link - I know it well.

.profile is the standard for any Snow Leopard Mac according to the Docs.
I originally kept everything within .bash_profile and .bashrc and
changed over on upgrade. Google for the release docs to find out more.

Hope you manage to solve it.

All the best

It looks like the .profile is loaded when no .bash_profile exists, but
that the .bash_profile supercedes .profile when it is found, preventing
it from being loaded. Adding source ~/.profile will fix the problem, yet
as John M. has made a good point about the two I have switch
everything over to .bash_profile

Thanks John