ERROR: while executing gem ... (Errno :: EISDIR) gem install rails

I am trying to install Ruby on rails, so first I installed RVM rvm install 1.9.2 . After that install gem install rails . He shows this error

 ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /var/lib/gems/1.8 directory. 

Then I used this sudo chmod 0777 /var/lib/gems/1.8/

After that, when I install, it shows this error:

 ERROR: While executing gem ... (Errno::EACCES) Permission denied - /var/lib/gems/1.8/cache/railties-3.2.2.gem 

Then I ran sudo chmod 0777 /var/lib/gems/1.8/cache/railties-3.2.2.gem

After that I install gem install rails . Again, showing this error

 ERROR: While executing gem ... (Errno::EISDIR) Is a directory - /var/lib/gems/1.8/cache/railties-3.2.2.gem 
+4
source share
2 answers

You are still using ruby ​​install (1.8). To use the Ruby that you just installed with rvm, do rvm use 1.9.2 . Then try gem install rails again. Rails gem must be installed under your home directory, you do not need root permissions.

To make rvm Ruby the default, so you always start with it when you open a new terminal, do rvm --default use 1.9.2 (note that there are two dashes).

+5
source

manually install gem-ctags , then try installing damaged pearls again

 gem install gem-ctags gem install backports -v '3.3.3' bundle install 
+1
source

Source: https://habr.com/ru/post/1401664/


All Articles