Cannot install RVM . Permission denied in /usr/local/rvm?

"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!

RVM is easy to install, but you are making it harder by trying to mix and match installation types. You do NOT need to create a new user. When run, RVM will create a directory in your home directory: ~/.

Rvm and install everything inside it. That means you will have all the correct permissions. You do NOT need to be running as root, you do NOT need to use sudo.

I'd recommend closing all your command-lines and open one fresh and start at your home directory. EDIT: If you are running as root, log out, and log back in to your normal account. For a single-user install you do NOT need to be root For a single user, using RVM as their Ruby sandbox, use the single-user installation docs Follow ALL the instructions on that page INCLUDING the "Post Install" section Close your terminal window, and reopen it.

If you have correctly followed the instructions above, typing rvm info should spit out a template of what is to come once you install a Ruby instance. If you see nothing output, or get an error, then retrace your steps in the "Post Install" section, and go through the "Troubleshooting" section. Most of the problems people have occur because they didn't bother to read the directions Once RVM is installed, type rvm notes and read what dependencies you need to install.

If you do not add those files your Rubies installed will be missing functionality. They will work, but some of the creature comforts you'll hear about won't work and you will wonder why After installing the dependencies you should be in good shape to install Rubies. Type rvm list known for all the Rubies RVM can install.

If you want 1.8.7 type rvm install 1.8.7 and, similarly rvm install 1.9.2 for Ruby 1.9.2. If you want a particular revision you can add that, based on the ones in the list It's important to periodically update RVM using rvm get head That will add features, fix bugs, and tell RVM about new versions of Ruby it can install if you request After installing a Ruby, type rvm list and it should show up in the list, looking something like this: rvm rubies ruby-1.8.7-p334 x86_64 ruby-1.9.2-p180 x86_64 Type rvm use 1.9.2 --default to set a default Ruby that will be sticky between logins. Use the version of whatever Ruby you want to default to if 1.9.2 doesn't float your boat.

Once you've defined a default it should look something like: rvm rubies ruby-1.8.7-p334 x86_64 => ruby-1.9.2-p180 x86_64 Before you begin installing gems into a RVM-managed Ruby, read RVM and RubyGems in particular the part that says "DO NOT use sudo... ". I repeat. Do NOT use sudo to install any gems, in spite of what some blog or web page says.

RVM's author knows better when it comes to working with RVM controlled Rubies. That is another mistake people use with RVM, again as a result of not reading the directions On Mac OS, you'll need the latest version of XCode for your OS. Do NOT use the XCode that came with Snow Leopard on the DVD.It is buggy.

Download and install a new version from Apple's Developer site It's a free download requiring a free registration. It's a big file, approximately 8GB, so you'll want to start it and walk away. Install XCode, and you should be ready to have RVM install Rubies Finally, RVM installs easily, as will the Rubies you ask it to install.

I have it on about four or five different machines and VMs on Mac OS, Ubuntu and CentOS. It takes me about a minute to install it and another minute to configure it and start installing a new Ruby.It really is that easy.

RVM is easy to install, but you are making it harder by trying to mix and match installation types. You do NOT need to create a new user. When run, RVM will create a directory in your home directory: ~/.

Rvm, and install everything inside it. That means you will have all the correct permissions. You do NOT need to be running as root, you do NOT need to use sudo.

I'd recommend closing all your command-lines and open one fresh and start at your home directory. EDIT: If you are running as root, log out, and log back in to your normal account. For a single-user install you do NOT need to be root.

For a single user, using RVM as their Ruby sandbox, use the single-user installation docs. Follow ALL the instructions on that page, INCLUDING the "Post Install" section. Close your terminal window, and reopen it.

If you have correctly followed the instructions above, typing rvm info should spit out a template of what is to come once you install a Ruby instance. If you see nothing output, or get an error, then retrace your steps in the "Post Install" section, and go through the "Troubleshooting" section. Most of the problems people have occur because they didn't bother to read the directions.

Once RVM is installed, type rvm notes and read what dependencies you need to install. If you do not add those files your Rubies installed will be missing functionality. They will work, but some of the creature comforts you'll hear about won't work and you will wonder why.

After installing the dependencies you should be in good shape to install Rubies. Type rvm list known for all the Rubies RVM can install. If you want 1.8.7 type rvm install 1.8.7, and, similarly, rvm install 1.9.2 for Ruby 1.9.2.

If you want a particular revision you can add that, based on the ones in the list. It's important to periodically update RVM using rvm get head. That will add features, fix bugs, and tell RVM about new versions of Ruby it can install if you request.

After installing a Ruby, type rvm list and it should show up in the list, looking something like this: rvm rubies ruby-1.8.7-p334 x86_64 ruby-1.9.2-p180 x86_64 Type rvm use 1.9.2 --default to set a default Ruby that will be sticky between logins. Use the version of whatever Ruby you want to default to if 1.9.2 doesn't float your boat. Once you've defined a default it should look something like: rvm rubies ruby-1.8.7-p334 x86_64 => ruby-1.9.2-p180 x86_64 Before you begin installing gems into a RVM-managed Ruby, read "RVM and RubyGems ", in particular the part that says "DO NOT use sudo... ".

I repeat. Do NOT use sudo to install any gems, in spite of what some blog or web page says. RVM's author knows better when it comes to working with RVM controlled Rubies.

That is another mistake people use with RVM, again as a result of not reading the directions. On Mac OS, you'll need the latest version of XCode for your OS. Do NOT use the XCode that came with Snow Leopard on the DVD.It is buggy.

Download and install a new version from Apple's Developer site. It's a free download requiring a free registration.It's a big file, approximately 8GB, so you'll want to start it and walk away. Install XCode, and you should be ready to have RVM install Rubies.

Finally, RVM installs easily, as will the Rubies you ask it to install. I have it on about four or five different machines and VMs on Mac OS, Ubuntu and CentOS. It takes me about a minute to install it and another minute to configure it and start installing a new Ruby.

It really is that easy.

Okay, I followed the instructions off the RVM website. And now I am getting bash: rvm: command not found after installing RVM and updating the ~/. Bash_profile file and restarting the terminal too :( – WarDoGG Mar 10 at 0:46 @WarDoGG, Append the end of your ~/.

Bash_profile showing where you've added the line to your startup to your original question. Also append the output of echo $PATH. Your path should show ~/.

Rvm as the first entry. – the Tin Man Mar 10 at 0:52 This is the output of echo $PATH : /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/? Usr/sbin:/usr/bin:/root/bin – WarDoGG Mar 10 at 0:53 This is what I have added at the end of ~/.

Bash_profile : -s "$HOME/. Rvm/scripts/rvm" && source "$HOME/. Rvm/scripts/rvm" # This loads RVM into a shell session.

– WarDoGG Mar 10 at 0:54 1 @WarDoGG, "I do not have any other account on my linux box other than root. I never use sudo and never use su. " O.M.G.That is such a bad idea.Do NOT run a Unix or Linux box as root unless you have a really good reason and the knowledge of why you should be doing that.

Jumping in and out to do maintenance is OK, but not for normal use. That said, being logged-in as your normal user, NOT root, and installing RVM as that user should fix things. – the Tin Man Mar 10 at 3:00.

Mkdir: cannot create directory `/usr/local/rvm': Permission denied If you've run the rvm installer as root previously, remove /usr/local/rvm and /etc/rvmrc.

I had the exact same probem - removing /etc/rvmrc solved it. – Chris Perkins Jun 6 at 11:08 The problem was rvm_path that was set to /usr/local in /etc/rvmrc – Philippe Rathé Jun 27 at 18:11.

I had the original issue reported in this question, "mkdir: cannot create directory `/usr/local/rvm': Permission denied" when trying to install rvm. This is my scenario and how I solved it - maybe this will help others with this same issue. I have Ubuntu 11.04 installed on a laptop, I only have 1 user, the one I created at install time, named nathan.

When I would try to install rvm as nathan, the rvm installer saw me as root and kept trying to install rvm globally, but since I wasn't really root, it couldn't get access to create directories in /usr/local/rvm. I'm far from an expert with Ubuntu, so I'm sure there are easier/better ways to accomplish the things I did (and I would love to learn about them), but this worked for me: I created a new user called rubydev I logged in as rubydev, opened a terminal and typed: rubydev~$ bash > ~/. Bash_profile nathan~$ echo 'export rvm_path="/home/nathan/.

Rvm"' > ~/. Rvmrc nathan~$ source . Bash_profile At this point, rvm was correctly installed under my home directory.To verify I typed: nathan~$ type rvm | head -1 rvm is a function (if you don't get this response, something else is wrong) Read the notes and installed any dependencies nathan~$ rvm notes I installed some rubies nathan~$ rvm install 1.8.7-head nathan~$ rvm install 1.9.2-head Verified install nathan~$ rvm list rvm rubies ruby-1.8.7-head x86_64 ruby-1.9.2-head x86_64 nathan~$ rvm use 1.9.2 using /home/nathan/.

Rvm/gems/ruby-1.9.2-head nathan~$ rvm list rvm rubies ruby-1.8.7-head x86_x64 => ruby-1.9.2-head x86_x64 Finally, I edited the preferences on the terminal itself to ensure the "Run command as as login shell" under the "Title and Command" tab was checked. It seems . Bash_profile isn't otherwise processed.

I removed the rubydev user I created in step 1. With all of that, I have a working rvm under Ubuntu 11.04 using my preferred username.

Look for file rvm. Sh below /etc directory (It may be in /etc, or /etc/init. D).

Also, try some grep rvm /etc -r, so you can find some files/lines which prevent you from installing rvm in your $HOME dir.

If you installing RVM as a user then the RVM folder should be generated in your home directory: ~/. Rvm Where there should be no permissions problems at all. I would suggest it is picking up some old config that is left over from your system installation.

Ensure there is no /etc/rvmrc or $HOME/. Rvmrc file left over because it might be using previously initialised variables from these files to construct an incorrect installation path. If we look at this section of the bash script: if ${rvm_ignore_rvmrc:-0} -eq 0 ; then for file in /etc/rvmrc "$HOME/.

Rvmrc " ; do if -s "$file" ; then source $file fi done fi It is trying to find one of these files, if it finds one if will run it possibly initialising rvm_path which will subsequently not be set as $HOME/. Rvm by this command rvm_path="${rvm_path:-"$HOME/. Rvm"}.

Thanks alot for the suggestion. I did restart my terminal and I could install RVM but now, I am getting bash: rvm: command not found after installing RVM and updating the ~/. Bash_profile file and restarting the terminal too :( – WarDoGG Mar 10 at 0:46 Ensure the rvm script exists in ~/.

Rvm/scripts directory if not there is something wrong with your installation. Then add this to your ~/. Bash_profile and ~/.

Bashrc -s "$HOME/. Rvm/scripts/rvm" && . "$HOME/.

Rvm/scripts/rvm" (one should work), then restart your temrinal again – whatsthebeef Mar 10 at 0:56 I added the output of my ~/. Bash_profile in my original question. – WarDoGG Mar 10 at 1:03 So is it working?

– whatsthebeef Mar 10 at 2:52.

I had the same issue. When I tried to create a gemset I would get a permission denied error. I just forgot to run the "rvm use 1.8.7" command first.

After that I was able to create and use the gemset without any problems.

In lasts versions of rvm you need remove /etc/profile. D/ also. This happen often if you try to install as root and then try again as a regular user.

Hope this help.

Download and install a new version from Apple's Developer site. It's a free download requiring a free registration. It's a big file, approximately 8GB, so you'll want to start it and walk away.

Install XCode, and you should be ready to have RVM install Rubies. Finally, RVM installs easily, as will the Rubies you ask it to install. I have it on about four or five different machines and VMs on Mac OS, Ubuntu and CentOS.

It takes me about a minute to install it and another minute to configure it and start installing a new Ruby. It really is that easy.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions