Trouble with rvm (Ruby Version Manager)

Hi-- Am having trouble with rvm. Successfully installed it, but when I tried to install Ruby 1.8.7, here is the error I got:

Paul-Denlingers-MacBook-Pro:~ pdenlinger$ rvm install 1.8.7 -bash: rvm: command not found

Tried closing terminal, quitting terminal, opening another tab, etc. but continued to get same error.

What to do?

Thanks!

You probably forgot to follow the post-install instruction of adding the rvm executable path to PATH.

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

Scroll down to the post install section.

Best regards

Peter De Berdt

Thank you.

Per your instructions, I added the PATH instructions to the .bash_profile file, and opened another shell.

But when I tried to confirm the installation, here is what I got:

Paul-Denlingers-MacBook-Pro:~ pdenlinger$ rvm | head -nl head: illegal line count -- l

What does it mean?

Thanks, Paul Denlinger

It means you used the letter L instead of the number one as the parameter for -n.

Best regards

Peter De Berdt

OK, now I got it.

Fixed.

Thank you.

Paul Denlinger

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?

kenvogt wrote in post #949751:

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.

Best,

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".

Please quote when replying.

kenvogt wrote in post #949886:

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.

Sure. It's just that this is a bash question, not a Rails question. Please see http://linux.die.net/man/1/bash (or just type "man bash") and Advanced Bash-Scripting Guide .

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?

I already told you that it was:

[quote]

Should I just create one and add that single line to it?

Yes. [end quote]

Best,

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.