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

Use a tmp dir when $HOME/.bundle/compact_index fails #4792

Closed
kayceecodes opened this issue Jul 17, 2016 · 4 comments
Closed

Use a tmp dir when $HOME/.bundle/compact_index fails #4792

kayceecodes opened this issue Jul 17, 2016 · 4 comments

Comments

@kayceecodes
Copy link

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 actually happened was...

Error details

Errno::EACCES: Permission denied @ dir_s_mkdir - /home/kaycee/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions20160717-3214-1st3h5d
  /usr/lib/ruby/2.3.0/tmpdir.rb:86:in `mkdir'
  /usr/lib/ruby/2.3.0/tmpdir.rb:86:in `block in mktmpdir'
  /usr/lib/ruby/2.3.0/tmpdir.rb:130:in `create'
  /usr/lib/ruby/2.3.0/tmpdir.rb:86:in `mktmpdir'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in `update'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:64:in `update'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:55:in `update_and_parse_checksums!'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:65:in `available?'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:15:in `call'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:15:in `block in compact_index_request'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher.rb:154:in `use_api'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `block in api_fetchers'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `select'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `api_fetchers'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:336:in `block in remote_specs'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/index.rb:10:in `build'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:335:in `remote_specs'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:82:in `specs'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/lazy_specification.rb:56:in `__materialize__'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:91:in `block in materialize'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `map!'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `materialize'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/definition.rb:140:in `specs'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/definition.rb:129:in `resolve_remotely!'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/installer.rb:195:in `resolve_if_need'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/installer.rb:70:in `run'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/installer.rb:22:in `install'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/cli/install.rb:102:in `run'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/cli.rb:175:in `install'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
  /var/lib/gems/2.3.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.5.1
Ruby 2.3.1p112 (2016-04-26 revision 0) [x86_64-linux-gnu]
GEM_HOME /var/lib/gems/2.3.0
GEM_PATH /var/lib/gems/2.3.0:/home/kaycee/.gem/ruby/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all
Git 2.7.4

  Bundler settings

orig_path
Set via BUNDLE_ORIG_PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/kaycee/.rvm/bin:/home/kaycee/.rvm/bin"
--- TEMPLATE END ---

@indirect
Copy link
Member

Thanks for reporting this! It looks like we need to handle this kind of error better.

@RochesterinNYC, this would be a good bugfix ticket I think--if the default home directory compact index destination isn't writable, we should use a tmp dir instead.

@RochesterinNYC
Copy link
Contributor

Yup, sounds like a nice GSoC PR opportunity.

@b-ggs
Copy link
Contributor

b-ggs commented Jul 19, 2016

I'll work on this!

@indirect indirect changed the title Supposedly I need a gem for lesson, "Display a Tic Tac Toe Board" Use a tmp dir when $HOME/.bundle/compact_index fails Aug 8, 2016
@indirect indirect mentioned this issue Aug 11, 2016
23 tasks
@coilysiren
Copy link
Contributor

Permission errors will be changing due to #5007 in 1.14, so I think it's safe to close this (and re-open if needed at a later date)

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

No branches or pull requests

5 participants