Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby Gem Installation Error + You don't have write permissions for the /usr/local/rvm/gems/ruby-2.0.0-p353 directory [duplicate]

Tags:

ruby

rubygems

gem

In my local machine, I am trying to install a formatter gem related to date. but while installing I am getting some strange error.

[admin@localhost test_folder]$ gem install formatter-0.0.1.gem
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/rvm/gems/ruby-2.0.0-p353
directory.

I am not able to install it locally. Operating system is CentOS and Ruby version is Ruby2.

Thanks in advance

like image 352
Rubyist Avatar asked Dec 09 '22 07:12

Rubyist


1 Answers

chmodding isn't the best way here. Propably ok for a local machine, but not for production.

rvm is made to be used without sudo or specific/sudo rights. reinstall would be more appreciated. clean the current rvm install rvm implode

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

and then close all consoles/bashes/terminales and login in again with the user you want to use rvm with and install it again.

see also here: Error while gem install on ubuntu 12.04 aws ec2

like image 105
The86Freak Avatar answered Apr 27 '23 22:04

The86Freak