Link to github for error printout
When i try to bundle install I receive the above error. I have tried what other posts suggest and the github community doesn't know the answer.
I am running Arch and am using zsh for my shell.
Ruby 2.3.1p112 (2016-04-26 revision 54768)[x86_64-linux]
First, run command
ls -l ~/.bundle/cache/compact_index/
You should see something like
drwxr-xr-x 3 myname staff 102 Jun 1 23:03 rubygems.org.443.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(I'm a miserable Chinese programmer so my folder is
ruby.taobao.org.443.07113fbafd9bf5f337f3f6cee4b3a723. I guess the dir name is
<rubygems source domain>.<rubygems source port (443 for HTTPS)>.<checksum>)
Pay attention to the
drwxr-xr-x part, and make sure it's NOT
If it is
drwxrwxrwx, then change it by the command
chmod 0755 rubygems.org.443.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
drwxrwxrwx (0777) means anyone can create any file in that dir (world writable) as well as remove/move them (not sticky). Bundler (>= 1.12.4) uses
compact_index which in turn uses
Dir::mktmpdir to create sub directories in that dir.
For security reason, the method
Dir::mktmpdir verifies the permission of the parent dir of the to-be-created tmp dir. If the permission is 0777 (drwxrwxrwx) then you will see this error because it's insecure.
0755 (drwxr-xr-x) is fine because only the owner (user) of that directory can create/delete/move files or sub directories in that dir (not world writable). Anyone else can only list their information.
1777 (drwxrwxrwt) is also fine because anyone can create file or sub directory in that dir (world writable), but only the creator of that file can remove/move it (sticky).