Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install rails - "File exists @ dir_s_mkdir" error

I have had rails installed and almost working. Was working on a solution to another problem with I accidentally closed the bash window. So I reopened it, and now I am unable to use rails at all and it's telling me that rails isn't installed. So I ran gem install rails --no-ri --no-rdocand now I get the following:

ERROR:  While executing gem ... (Errno::EEXIST)
File exists @ dir_s_mkdir - /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/gems`

How do I correct this error?

like image 628
trick420 Avatar asked Apr 11 '14 21:04

trick420


2 Answers

I just removed the broken gems, site_ruby and vendor_ruby symlinks from the /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/ folder and now everything seems to work fine.

like image 150
Samuel Avatar answered Oct 17 '22 15:10

Samuel


I just added a gems/ directory here /usr/local/lib/ruby/ and that solved the issue.

like image 2
JamieR Avatar answered Oct 17 '22 14:10

JamieR