Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Error Installing Bundler - Parent Directory is World Writable but not Sticky #4599

Closed
JARM876 opened this issue May 22, 2016 · 37 comments
Closed

Comments

@JARM876
Copy link

JARM876 commented May 22, 2016

Hi,

I received the following error when trying to install the bundler to use wpscan. Could anyone take a look and let me know what I'm doing wrong? I'm very new to all this. Thanks!

--- ERROR REPORT TEMPLATE -------------------------------------------------------

  • What did you do?

    I ran the command /Users/jodi-ann/.rvm/rubies/ruby-2.3.1/bin/bundle install

  • What did you expect to happen?

    I expected Bundler to...

  • What happened instead?

    Instead, what actually happened was...

Error details

ArgumentError: parent directory is world writable but not sticky
  /Users/jodi-ann/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tmpdir.rb:93:in `ensure in mktmpdir'
  /Users/jodi-ann/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tmpdir.rb:95:in `mktmpdir'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in `update'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:64:in `update'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:55:in `update_and_parse_checksums!'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/fetcher/compact_index.rb:65:in `available?'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/fetcher/compact_index.rb:15:in `call'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/fetcher/compact_index.rb:15:in `block in compact_index_request'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/fetcher.rb:154:in `use_api'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/source/rubygems.rb:331:in `block in api_fetchers'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/source/rubygems.rb:331:in `select'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/source/rubygems.rb:331:in `api_fetchers'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/source/rubygems.rb:336:in `block in remote_specs'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/index.rb:10:in `build'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/source/rubygems.rb:335:in `remote_specs'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/source/rubygems.rb:82:in `specs'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/lazy_specification.rb:56:in `__materialize__'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/spec_set.rb:91:in `block in materialize'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/spec_set.rb:88:in `map!'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/spec_set.rb:88:in `materialize'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/definition.rb:140:in `specs'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/definition.rb:129:in `resolve_remotely!'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/installer.rb:195:in `resolve_if_need'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/installer.rb:70:in `run'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/installer.rb:22:in `install'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/cli/install.rb:102:in `run'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/cli.rb:175:in `install'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/cli.rb:11:in `start'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/exe/bundle:27:in `block in <top (required)>'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.4/exe/bundle:19:in `<top (required)>'
  /Users/jodi-ann/.rvm/rubies/ruby-2.3.1/bin/bundle:22:in `load'
  /Users/jodi-ann/.rvm/rubies/ruby-2.3.1/bin/bundle:22:in `<main>'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/bin/ruby_executable_hooks:15:in `eval'
  /Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/bin/ruby_executable_hooks:15:in `<main>'

Environment

Bundler 1.12.4
Rubygems 2.6.4
Ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
GEM_HOME /Users/jodi-ann/.rvm/gems/ruby-2.3.1@wpscan
GEM_PATH /Users/jodi-ann/.rvm/gems/ruby-2.3.1@wpscan:/Users/jodi-ann/.rvm/gems/ruby-2.3.1@global
RVM 1.27.0 (latest)
Git 2.8.1
rubygems-bundler (1.4.4)

  Bundler settings

without
Set for your local app (/Users/jodi-ann/wpscan/.bundle/config): "test"
orig_path
Set via BUNDLE_ORIG_PATH: "/Users/jodi-ann/.rvm/gems/ruby-2.3.1@wpscan/bin:/Users/jodi-ann/.rvm/gems/ruby-2.3.1@global/bin:/Users/jodi-ann/.rvm/rubies/ruby-2.3.1/bin:/Users/jodi-ann/.rvm/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
orig_gem_path
Set via BUNDLE_ORIG_GEM_PATH: "/Users/jodi-ann/.rvm/gems/ruby-2.3.1@wpscan:/Users/jodi-ann/.rvm/gems/ruby-2.3.1@global"
--- TEMPLATE END ----------------------------------------------------------------

@alecharmon
Copy link

im having the same exact issue :(

@colby-swandale
Copy link
Member

Hi, can you please share the output of bundle env. Thanks!

@JARM876
Copy link
Author

JARM876 commented May 25, 2016

Here it is:

System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'bundler' (>= 0) among 19 total gem(s) (Gem::LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in gem' from /usr/local/bin/bundle:22:in

'

Thanks!

@hafi23
Copy link

hafi23 commented May 27, 2016

Same problem when installing a new gem (bundle install).
Here is my bundle env.

Environment

Bundler   1.12.5
Rubygems  2.5.1
Ruby      2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
GEM_HOME  /Users/aa/.rvm/gems/ruby-2.3.0
GEM_PATH  /Users/aa/.rvm/gems/ruby-2.3.0:/Users/aa/.rvm/gems/ruby-2.3.0@global
RVM       1.27.0 (latest)
Git       2.5.4 (Apple Git-61)
rubygems-bundler (1.4.4)

....
Any help would be much appreciated.

@ddfznt
Copy link

ddfznt commented May 27, 2016

try sudo chmod 1777 ~/.bundle

@JARM876
Copy link
Author

JARM876 commented May 29, 2016

.Tried sudo chmod 1777 ~/.bundle and got the same error when trying to install it.

@BrennanMcDonald
Copy link

Having the same issue.

ran bundle install

Environment Details:

Bundler 1.12.5
Rubygems 2.5.1
Ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
GEM_HOME /home/Brennan/.rvm/gems/ruby-2.3.1
GEM_PATH /home/Brennan/.rvm/gems/ruby-2.3.1:/home/Brennan/.rvm/gems/ruby-2.3.1@global
RVM 1.27.0 (latest)
Git 1.9.1

@jufemaiz
Copy link

jufemaiz commented Jun 3, 2016

Can confirm this is happening with me too.

--- ERROR REPORT TEMPLATE -------------------------------------------------------

  • What did you do?

    I ran the command /usr/local/bin/bundle install --deployment

  • What did you expect to happen?

    I expected Bundler to install gems

  • What happened instead?

    Instead, what actually happened was Bundler failed

Error details

ArgumentError: parent directory is world writable but not sticky
  /usr/share/ruby/2.0/tmpdir.rb:92:in `ensure in mktmpdir'
  /usr/share/ruby/2.0/tmpdir.rb:94:in `mktmpdir'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in `update'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:64:in `update'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:55:in `update_and_parse_checksums!'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:65:in `available?'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:15:in `call'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:15:in `block in compact_index_request'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/fetcher.rb:154:in `use_api'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `block in api_fetchers'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `select'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `api_fetchers'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:336:in `block in remote_specs'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/index.rb:10:in `build'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:335:in `remote_specs'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:82:in `specs'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/lazy_specification.rb:56:in `__materialize__'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:91:in `block in materialize'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `map!'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `materialize'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/definition.rb:140:in `specs'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/definition.rb:129:in `resolve_remotely!'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/installer.rb:195:in `resolve_if_need'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/installer.rb:70:in `run'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/installer.rb:22:in `install'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/cli/install.rb:102:in `run'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/cli.rb:175:in `install'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
  /usr/local/share/ruby/gems/2.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
  /usr/local/bin/bundle:23:in `load'
  /usr/local/bin/bundle:23:in `<main>'

Environment

Bundler 1.12.5
Rubygems 2.0.14
Ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]
GEM_HOME /var/app/ondeck/vendor/bundle/ruby/2.0
GEM_PATH
Git 1.8.3.1

  Bundler settings

path
Set for your local app (/var/app/ondeck/.bundle/config): "vendor/bundle"
disable_shared_gems
Set for your local app (/var/app/ondeck/.bundle/config): true
frozen
Set for your local app (/var/app/ondeck/.bundle/config): "1"
without
Set for your local app (/var/app/ondeck/.bundle/config): "test:development"
Set via BUNDLE_WITHOUT: "test:development"
orig_path
Set via BUNDLE_ORIG_PATH: "/sbin:/usr/sbin:/bin:/usr/bin"
--- TEMPLATE END ----------------------------------------------------------------

@rudiss
Copy link

rudiss commented Jun 5, 2016

just install a older version of bundler
first gem uninstall bundler and say yes to all and next use
gem install bundler -v 1.12.3

@wycats
Copy link
Contributor

wycats commented Jun 6, 2016

I also experienced this bug, and it was also fixed by downgrading to 1.12.3.

@segiddins
Copy link
Member

@domcleal any interest in looking into this?

@domcleal
Copy link
Contributor

domcleal commented Jun 6, 2016

The error (from Ruby's temp helper) suggests there's a directory in ~/.bundle that is 0777, which may not be secure as it's missing the sticky bit.

Try resetting all cache directories to a normal set of permissions:

find ~/.bundle/cache -type d -exec chmod 0755 {} +

The advice above for 1777 isn't terrible, but this is probably preferable! The affected directory is probably below ~/.bundle and not ~/.bundle itself, so using the find command ought to fix it.

If you're still having the problem, please gist output from find ~/.bundle -type d -exec ls -ld {} +

@BrennanMcDonald
Copy link

@domcleal

find ~/.bundle/cache -type d -exec chmod 0755 {} +
Seemed to work for me.

@segiddins
Copy link
Member

If there's some way to fix this inside of bundler, we should. A PR from someone who understands why this is happening would be 🚀

@domcleal
Copy link
Contributor

domcleal commented Jun 7, 2016

I'm struggling to think why it'd be happening, my best guess is that it's either an old bug (e.g. where ~/.bundle/cache dirs were created with a bad umask) or people have run commands to open permissions to fix some other problem.

Some solutions that may help:

  1. Add a sanity check/fix for permissions on ~/.bundle and its subdirs, ensuring they're not world writeable and resetting those permission bits if set. This would appease mktmpdir and perhaps make ~/.bundle more secure. (Note that this would still fail for some other bug reports where ~/.bundle dirs are already owned by other users, e.g. root.)

  2. Use an internal copy of mktmpdir without the sticky test (ruby/ruby@bcb9e567) and restricted to ~/.bundle. Though this may slightly worsen security if ~/.bundle is world writeable.

  3. Create a ~/.bundle/tmp or similar and verify permissions, running mktmpdir there instead. This might just move the problem if somehow dirs are being set to 0777, but might help users with existing installations with those permissions.

@JARM876
Copy link
Author

JARM876 commented Jun 7, 2016

Thanks so much for all the help with this. However, here is the new error message I am receiving after installing the earlier bundle version:

Could not find gem 'terminal-table (>= 1.6.0)' in any of the gem sources listed in your Gemfile or available on this machine.
Run bundle install to install missing gems.

Any ideas?

@JARM876
Copy link
Author

JARM876 commented Jun 8, 2016

@domcleal: Here is my output from

$ find ~/.bundle -type d -exec ls -ld {} +:

find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4561-bink6f: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77585-1ybj2nc: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44830-uktyji: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44844-qe6g2f: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-737-14flwmb: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160529-54503-17ceznm: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160529-54503-jc88uo: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1761-1sq8oa1: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1761-wih0dm: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25750-12fwguq: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25768-5wjr59: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25818-126exyk: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25818-c23xie: Permission denied
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/info: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4406-gxpv4x: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4418-6ua5k8: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4428-rczflq: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4452-l70bm1: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4561-bink6f: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77585-1ybj2nc: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44830-uktyji: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44844-qe6g2f: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-737-14flwmb: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160529-54503-17ceznm: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160529-54503-jc88uo: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1761-1sq8oa1: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1761-wih0dm: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25750-12fwguq: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25768-5wjr59: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25818-126exyk: Operation not permitted
chmod: Unable to change file mode on /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25818-c23xie: Operation not permitted
Jodi-Anns-MacBook-Pro:wpscan jodi-ann$ find ~/.bundle -type d -exec ls -ld {} +
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4561-bink6f: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77585-1ybj2nc: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44830-uktyji: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44844-qe6g2f: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-737-14flwmb: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160529-54503-17ceznm: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160529-54503-jc88uo: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1761-1sq8oa1: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1761-wih0dm: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25750-12fwguq: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25768-5wjr59: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25818-126exyk: Permission denied
find: /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25818-c23xie: Permission denied
drwxrwxrwt    3 root      staff   102 May 21 13:52 /Users/jodi-ann/.bundle
drwxr-xr-x    3 root      staff   102 May 21 13:52 /Users/jodi-ann/.bundle/cache
drwxrwxrwx    4 root      staff   136 May 21 15:01 /Users/jodi-ann/.bundle/cache/compact_index
drwxrwxrwx   55 root      staff  1870 Jun  7 20:46 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47
drwxrwxrwx  147 root      staff  4998 May 21 13:52 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/info
drwxrwxrwx    2 root      staff    68 May 21 14:51 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4406-gxpv4x
drwxrwxrwx    3 root      staff   102 May 21 14:53 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4418-6ua5k8
drwxrwxrwx    3 root      staff   102 May 21 14:56 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4428-rczflq
drwxrwxrwx    2 root      staff    68 May 21 15:00 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4452-l70bm1
drwxr-xr-x    2 jodi-ann  staff    68 May 21 15:01 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4457-18ovzn6
drwxr-xr-x    3 jodi-ann  staff   102 May 21 15:05 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4467-euztrv
drwxr-xr-x    2 jodi-ann  staff    68 May 21 15:09 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4555-1h1sqc9
drwx------    3 root      staff   102 May 21 15:10 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4561-bink6f
drwxr-xr-x    3 jodi-ann  staff   102 May 21 15:15 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-4713-6o8q7m
drwxr-xr-x    2 jodi-ann  staff    68 May 21 16:04 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77230-osy1v6
drwxr-xr-x    3 jodi-ann  staff   102 May 21 16:04 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77232-1xaw3jc
drwxr-xr-x    3 jodi-ann  staff   102 May 21 16:05 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77237-taqx4w
drwxr-xr-x    3 jodi-ann  staff   102 May 21 16:10 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77254-13fbpi0
drwxr-xr-x    3 jodi-ann  staff   102 May 21 16:14 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77367-1un91p2
drwxr-xr-x    2 jodi-ann  staff    68 May 21 16:19 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77526-11ce0ms
drwx------    3 root      staff   102 May 21 16:20 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-77585-1ybj2nc
drwxr-xr-x    3 jodi-ann  staff   102 May 21 16:24 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-80717-i0zthi
drwxr-xr-x    2 jodi-ann  staff    68 May 21 16:28 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160521-80800-1o25p7o
drwx------    2 root      staff    68 May 22 10:46 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44830-uktyji
drwx------    2 root      staff    68 May 22 10:49 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44844-qe6g2f
drwxr-xr-x    2 jodi-ann  staff    68 May 22 10:55 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44872-17u48zi
drwxr-xr-x    3 jodi-ann  staff   102 May 22 10:57 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44881-ma8l16
drwxr-xr-x    3 jodi-ann  staff   102 May 22 11:02 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-44991-1slv34d
drwxr-xr-x    2 jodi-ann  staff    68 May 22 11:05 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-45116-1jmg3wb
drwxr-xr-x    2 jodi-ann  staff    68 May 22 11:07 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-45125-1lbvcwm
drwxr-xr-x    2 jodi-ann  staff    68 May 22 11:14 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-45214-ygm4x5
drwxr-xr-x    3 jodi-ann  staff   102 May 22 11:16 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-45219-1sn0hol
drwxr-xr-x    3 jodi-ann  staff   102 May 22 11:17 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-45230-1hojs5n
drwxr-xr-x    2 jodi-ann  staff    68 May 22 11:30 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-45384-xvbf0l
drwxr-xr-x    2 jodi-ann  staff    68 May 22 11:39 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-45895-asd9qf
drwxr-xr-x    2 jodi-ann  staff    68 May 22 11:44 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-45912-9uceif
drwxr-xr-x    2 jodi-ann  staff    68 May 22 11:54 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-504-10ruknw
drwx------    2 root      staff    68 May 22 11:57 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-737-14flwmb
drwxr-xr-x    3 jodi-ann  staff   102 May 22 09:52 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-9405-cn0bql
drwxr-xr-x    2 jodi-ann  staff    68 May 22 09:52 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160522-9405-ozqdhw
drwx------    2 root      staff    68 May 29 19:00 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160529-54503-17ceznm
drwx------    3 root      staff   102 May 29 19:00 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160529-54503-jc88uo
drwx------    2 root      staff    68 Jun  7 20:44 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1761-1sq8oa1
drwx------    3 root      staff   102 Jun  7 20:44 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1761-wih0dm
drwxr-xr-x    3 jodi-ann  staff   102 Jun  7 20:46 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-1772-1cu8hec
drwxr-xr-x    2 jodi-ann  staff    68 Jun  7 19:49 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25745-1fpizck
drwxr-xr-x    3 jodi-ann  staff   102 Jun  7 19:49 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25745-1ky8l6b
drwx------    3 root      staff   102 Jun  7 19:50 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25750-12fwguq
drwx------    3 root      staff   102 Jun  7 19:51 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25768-5wjr59
drwx------    3 root      staff   102 Jun  7 20:12 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25818-126exyk
drwx------    2 root      staff    68 Jun  7 20:12 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25818-c23xie
drwxr-xr-x    3 jodi-ann  staff   102 Jun  7 20:15 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25838-j1yjo9
drwxr-xr-x    2 jodi-ann  staff    68 Jun  7 20:15 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-25838-rd3q3b
drwxr-xr-x    3 jodi-ann  staff   102 Jun  7 20:36 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-679-7fvvg7
drwxr-xr-x    2 jodi-ann  staff    68 Jun  7 20:36 /Users/jodi-ann/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160607-679-v8uaq

@domcleal
Copy link
Contributor

domcleal commented Jun 8, 2016

@JARM876 you have lots of directories owned by root in your own directory, I'd guess you've been using sudo or similar. I'd suggest running sudo chown -R jodi-ann:staff ~/.bundle to reclaim ownership and then the find/chmod again.

Regarding your table_print error, I'd suggest filing a new issue with a copy of your Gemfile and bundle env output so we don't cross threads.

@stevensona
Copy link

find ~/.bundle/cache -type d -exec chmod 0755 {} +

Fixed issue for me on Windows Subsystem for Linux fresh install. Thanks @domcleal

@Zatara7
Copy link

Zatara7 commented Jun 22, 2016

Thanks @stevensona that worked for me. Maybe should inform others using WSL because your answer was difficult to find.

@stevensona
Copy link

@Zatara7 Any idea how to get the word out?

@Zatara7
Copy link

Zatara7 commented Jun 24, 2016

You could possibly add a new issue here with the solution:
https://github.com/Microsoft/BashOnWindows

I tried creating a subreddit for this but haven't had time to work on it.
https://www.reddit.com/r/winbash

On Wed, Jun 22, 2016 at 4:48 PM, Adam Stevenson notifications@github.com
wrote:

@Zatara7 https://github.com/Zatara7 Any idea how to get the word out?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#4599 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AE-5e-hgajTjabipICE23hmidZ6yP-8Hks5qOa27gaJpZM4IkAQO
.

@sandhilt
Copy link

Try:

chmod +t -R ~/.bundle

source: GoRails

@lsegal
Copy link

lsegal commented Jul 22, 2016

Is this permission thing strictly necessary? It looks like it's coming from Ruby, but this wasn't happening before (downgrading correctly resolves the issue) so I'm curious why the change.

FWIW, Bash on Windows users are going to have a hard time with this. The above fix doesn't actually work, since chmod doesn't actually yet modify ACL permissions for your Windows files (it only works in the virtual Linux partition). See microsoft/WSL#81. At the very least, it didn't seem to work for me, since ~/.bundle points to my C:\Users\Loren.bundle directory.

@domcleal
Copy link
Contributor

It looks like it's coming from Ruby, but this wasn't happening before (downgrading correctly resolves the issue) so I'm curious why the change.

1.12.x contains a new cache of gem information which is shared across multiple processes. My fix in 1.12.4 added the call to Ruby's mktmpdir to fix concurrency and corruption issues with the cache, but mktmpdir does enforce secure permissions causing the error. #4599 (comment) notes some alternatives.

@augustocsmartins
Copy link

Using the command fixed for me:

$ find ~/.bundle/cache -type d -exec chmod 0755 {} +

And I'm using BashOnWindows

@sanjaykarki
Copy link

sanjaykarki commented Aug 5, 2016

I'm having the same issue and @base16soft command fixed the issue.

@itaysk
Copy link

itaysk commented Aug 22, 2016

(WSL on Windows 10)
Fixed using:

$ find ~/.bundle/cache -type d -exec chmod +t {} +

However, I wander what's the root cause

@mjerem34
Copy link

$ sudo chmod 755 -R ~/.rvm

@sebastian-palma
Copy link

sebastian-palma commented Sep 1, 2016

@stevensona +1 and the heaven, find ~/.bundle/cache -type d -exec chmod 0755 {} + did work, thanks!

indirect added a commit that referenced this issue Oct 3, 2016
As we noticed in #4519, we need to use a temporary directory to hold
compact index downloads so that multiple processes don't write to the
same files at the same time and break everything.

The fix for that was #4561, which added temporary directories to hold
all files as they download, and then uses the (atomic) `FileUtils.cp` to
move the completed downloads into place, so there is never a point where
multiple processes are trying to write into the file at once.

Unfortunately, using `Dir.mktmpdir` requires that the parent directory
be _either_ world writable or sticky, but not both. Based on #4599, it
looks like it's common for home directories to be both world writable
and sticky. While that's a security problem by itself, it's not a big
concern for Bundler and the compact index. So we want to let users
continue to use Bundler, even with the compact index, without having to
change the permissions on their home directories.

This commit changes the `mktmpdir` call to create the temporary
directory inside the default OS tempdir, which is typically `/tmp` or
`/var/tmp` depending on distro. Since that directory is designed to hold
other temporary directories, that change should (theoretically) reduce
or eliminate the problem reported in #4599.
homu added a commit that referenced this issue Oct 4, 2016
use /tmp for mktmpdir

As we noticed in #4519, we need to use a temporary directory to hold
compact index downloads so that multiple processes don't write to the
same files at the same time and break everything.

The fix for that was #4561, which added temporary directories to hold
all files as they download, and then uses the (atomic) `FileUtils.cp` to
move the completed downloads into place, so there is never a point where
multiple processes are trying to write into the file at once.

Unfortunately, using `Dir.mktmpdir` requires that the parent directory
be _either_ world writable or sticky, but not both. Based on #4599, it
looks like it's common for home directories to be both world writable
and sticky. While that's a security problem by itself, it's not a big
concern for Bundler and the compact index. So we want to let users
continue to use Bundler, even with the compact index, without having to
change the permissions on their home directories.

This commit changes the `mktmpdir` call to create the temporary
directory inside the default OS tempdir, which is typically `/tmp` or
`/var/tmp` depending on distro. Since that directory is designed to hold
other temporary directories, that change should (theoretically) reduce
or eliminate the problem reported in #4599.
@pixeltrix
Copy link
Contributor

I think this is actually being caused by microsoft/WSL#352 - the .rvm, .gem, .bundle directories are all being created world-writeable.

indirect pushed a commit that referenced this issue Oct 11, 2016
use /tmp for mktmpdir

As we noticed in #4519, we need to use a temporary directory to hold
compact index downloads so that multiple processes don't write to the
same files at the same time and break everything.

The fix for that was #4561, which added temporary directories to hold
all files as they download, and then uses the (atomic) `FileUtils.cp` to
move the completed downloads into place, so there is never a point where
multiple processes are trying to write into the file at once.

Unfortunately, using `Dir.mktmpdir` requires that the parent directory
be _either_ world writable or sticky, but not both. Based on #4599, it
looks like it's common for home directories to be both world writable
and sticky. While that's a security problem by itself, it's not a big
concern for Bundler and the compact index. So we want to let users
continue to use Bundler, even with the compact index, without having to
change the permissions on their home directories.

This commit changes the `mktmpdir` call to create the temporary
directory inside the default OS tempdir, which is typically `/tmp` or
`/var/tmp` depending on distro. Since that directory is designed to hold
other temporary directories, that change should (theoretically) reduce
or eliminate the problem reported in #4599.
@neurogenesis
Copy link

For those running into the file permissions issue, try fixing permissions by setting umask 022 before installing tools like rvm/rbenv/zsh/antigen/etc.:

See issue microsoft/WSL#352 for details.

Normally this is handled by the login process, but login isn't used by Bash on Windows. You'll have to add it directly to your ~/.bashrc, or ~/.profile.

@pixeltrix
Copy link
Contributor

@neurogenesis you can run bash.exe with the --login option, I changed the shortcut to the following:

C:\Windows\System32\cmd.exe /C start bash.exe ~ --login

For some reason you can't pass options directly to the command in a shortcut target so you have to go through cmd.exe to get it to work.

@neurogenesis
Copy link

@pixeltrix : thx for the reply. For sure there are a few workarounds. Was just listing some additional installs that will break with the missing umask. The --login option doesn't read from /etc/passwd, so things like shell variables aren't set. I ended up adding umask and exec /bin/zsh to my ~/.bashrc.

Ideally this will be addressed further upstream so shells other than bash are first-class citizens too (invoking something like linux.exe, which bootstraps a more complete environment than just the bash shell).

@jwlindsey
Copy link

jwlindsey commented Feb 5, 2017

james@Darkwing-duck-linux:~/school/projects/lifeflix [master|✔]$ bundle install Warning: the running version of Bundler (1.13.2) is older than the version that created the lockfile (1.14.3). We suggest you upgrade to the latest version of Bundler by running gem install bundler`.
--- ERROR REPORT TEMPLATE -------------------------------------------------------

  • What did you do?
    I ran the command /usr/local/bin/bundle install

  • What did you expect to happen?
    I expected Bundler to...

  • What happened instead?
    Instead, what happened was...
    Error details
    ArgumentError: parent directory is world writable but not sticky
    /usr/lib/ruby/2.2.0/tmpdir.rb:92:in ensure in mktmpdir' /usr/lib/ruby/2.2.0/tmpdir.rb:94:in mktmpdir'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in update' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:64:in update'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:55:in update_and_parse_checksums!' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/fetcher/compact_index.rb:67:in available?'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/fetcher/compact_index.rb:15:in call' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/fetcher/compact_index.rb:15:in block in compact_index_request'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/fetcher.rb:157:in use_api' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/source/rubygems.rb:332:in block in api_fetchers'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/source/rubygems.rb:332:in select' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/source/rubygems.rb:332:in api_fetchers'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/source/rubygems.rb:337:in block in remote_specs' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/index.rb:10:in build'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/source/rubygems.rb:336:in remote_specs' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/source/rubygems.rb:83:in specs'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/lazy_specification.rb:61:in __materialize__' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/spec_set.rb:91:in block in materialize'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/spec_set.rb:88:in map!' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/spec_set.rb:88:in materialize'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/definition.rb:174:in specs' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/definition.rb:162:in resolve_remotely!'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/installer.rb:225:in resolve_if_need' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/installer.rb:78:in run'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/installer.rb:24:in install' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/cli/install.rb:71:in run'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/cli.rb:189:in install' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in invoke_command' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/vendor/thor/lib/thor.rb:359:in dispatch'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/cli.rb:20:in dispatch' /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/vendor/thor/lib/thor/base.rb:440:in start'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/cli.rb:11:in start' /var/lib/gems/2.2.0/gems/bundler-1.13.2/exe/bundle:34:in block in <top (required)>'
    /var/lib/gems/2.2.0/gems/bundler-1.13.2/lib/bundler/friendly_errors.rb:100:in with_friendly_errors' /var/lib/gems/2.2.0/gems/bundler-1.13.2/exe/bundle:26:in <top (required)>'
    /usr/local/bin/bundle:23:in load' /usr/local/bin/bundle:23:in

    '
    Environment

    Bundler 1.13.2
    Rubygems 2.4.5.2
    Ruby 2.2.6p396 (2016-11-15 revision 56800) [x86_64-linux-gnu]
    GEM_HOME /var/lib/gems/2.2.0
    GEM_PATH /var/lib/gems/2.2.0:/home/james/.gem/ruby/2.2.0:/usr/share/rubygems-integration/2.2.0:/usr/share/rubygems-integration/all
    Git 1.9.1
    --- TEMPLATE END ----------------------------------------------------------------
    Unfortunately, an unexpected error occurred, and Bundler cannot continue.
    First, try this link to see if there are any existing issue reports for this error:
    https://github.com/bundler/bundler/search?q=parent+directory+is+world+writable+but+not+sticky&type=Issues
    If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
    https://github.com/bundler/bundler/issues/new
    james@Darkwing-duck-linux:~/school/projects/lifeflix [master|✔]$ `

I saw several fixes for Windows but I run linux mint. I haven't found any commands in here that work for me yet.

--Update--

So I ended up running

find ~/.bundle/cache -type d -exec chmod +t {} +

then
bundle install

which didn't work due to permissions, then I manually edited the permissions to allow all read and write to my system ruby gems folder

then ran bundle install again and this time it was successful and installed a little pest called Installing bcrypt 3.1.11 with native extensions but I did not get the bundle complete message, only a return prompt

then I ran bundle install for a second time and got the bundle complete! message

then I could run my rails server command

then I was able to get to my http://localhost:3000/users/sign_up page

@colby-swandale
Copy link
Member

I'm closing this issue, if anyone is experiencing this issue - please open a new issue with the details of your problem.

@IgorGanapolsky
Copy link

sudo chmod 1777 ~/.bundle

Error: no such file or directory

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests