Rvm Installation - /Usr/Local/Rvm:Permission Denied (Before This, I Deleted Home Directory by Mistake in Ubuntu)

rvm installation - /usr/local/rvm : permission denied (Before this, I deleted home directory by mistake in Ubuntu)

You need to clean old installation:

sudo rm -rf /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm

and restart to clean all loaded shell environment - it is required step

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

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. 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 installation: `/usr/local/rvm': Permission denied

As a quick variant of eliminating this problem you can create rvm directory and allow everyone to write to it:

sudo mkdir /usr/local/rvm; sudo chmod a+xwr /usr/local/rvm

Rvm ruby Permission denied

You have a multiuser installation of rvm - this is not recommended because of the troubles you can get with it (like yours).

Since you are already there this should fix it:

rvmsudo rvm get stable --auto-dotfiles
rvm fix-permissions system

Also make sure you are in rvm group - if not add yourself:

rvm group add rvm $USER

and log in to a new shell (log out and log back in).

Why do I get permissions errors installing RVM?

It seems you do not run the command as root.

Try sudo curl -L https://get.rvm.io | bash-s stable - autolibs = homebrew - rails.

EDIT:

Ok, i just see this post.
This issue can be due to oldest rvm installation and to solve it, you need to clean oldest installation.

To do that: sudo rm -rf /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm
Then, rerun your install command line.

Hope it will work.

Impossible to install single-user version of RVM

Indeed, I solved this by uninstalling old versions of RVM: sudo rvm implode and then deleting the file /etc/rvmrc. Once done, I could install the single-user version and everything worked fine!

Sorry Remear, I wanted to edit your answer or complete it via my comment but I could not (comment can only be edited within 5 minutes...at least I upvoted...).

How do I fix a RVM install that was done using SUDO

Remove also

/etc/rvmrc 

directory and then install RVM

Should Success install !!!

rvm install 1.9.2 Permission denied

I am running into the same exact problem. I compared it against another installation of rvm on a different box that is working and noticed the permission for "manage" is different.

The box that is working:

-rwxr-xr-x  1 deployer deployer 59002 2011-05-19 22:56 manage

The box that is not working:

-rw-r--r--  1 deployer deployer 59076 2011-05-22 22:12 manage

I did a chmod 755 manage and that seems to have fixed it. I installed rvm the same way on both boxes, not sure why there's a difference.

You can try
chmod 755 /home/kevinwmerritt/.rvm/scripts/manage and see if that resolves it



Related Topics



Leave a reply



Submit