我正在尝试运行bundle install
命令,我收到此错误。我尝试了各种解决方案,例如更改读/写权限,甚至我还卸载并重新安装了bundler。
我知道这里有一个类似的问题(link),但在他的例子中,捆绑者实际上已经取出东西并在死亡之前开始通过宝石。在我的情况下,它只是在一开始就消失了。
非常感谢任何见解!
[wbrugato@wblaptop labels]$ bundle install
Error details
Errno::EACCES: Permission denied @ rb_sysopen - /home/wbrugato/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions
/usr/share/ruby/fileutils.rb:1393:in `initialize'
/usr/share/ruby/fileutils.rb:1393:in `open'
/usr/share/ruby/fileutils.rb:1393:in `block in copy_file'
/usr/share/ruby/fileutils.rb:1392:in `open'
/usr/share/ruby/fileutils.rb:1392:in `copy_file'
/usr/share/ruby/fileutils.rb:1360:in `copy'
/usr/share/ruby/fileutils.rb:472:in `block in copy_entry'
/usr/share/ruby/fileutils.rb:1498:in `wrap_traverse'
/usr/share/ruby/fileutils.rb:469:in `copy_entry'
/usr/share/ruby/fileutils.rb:530:in `rescue in block in mv'
/usr/share/ruby/fileutils.rb:527:in `block in mv'
/usr/share/ruby/fileutils.rb:1571:in `block in fu_each_src_dest'
/usr/share/ruby/fileutils.rb:1587:in `fu_each_src_dest0'
/usr/share/ruby/fileutils.rb:1569:in `fu_each_src_dest'
/usr/share/ruby/fileutils.rb:517:in `mv'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:55:in `block in update'
/usr/share/ruby/tmpdir.rb:89:in `mktmpdir'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in `update'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:65:in `update'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:56:in `update_and_parse_checksums!'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/fetcher/compact_index.rb:67:in `available?'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/fetcher/compact_index.rb:15:in `call'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/fetcher/compact_index.rb:15:in `block in compact_index_request'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/fetcher.rb:157:in `use_api'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/source/rubygems.rb:332:in `block in api_fetchers'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/source/rubygems.rb:332:in `select'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/source/rubygems.rb:332:in `api_fetchers'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/source/rubygems.rb:337:in `block in remote_specs'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/index.rb:10:in `build'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/source/rubygems.rb:336:in `remote_specs'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/source/rubygems.rb:83:in `specs'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/lazy_specification.rb:61:in `__materialize__'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/spec_set.rb:91:in `block in materialize'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/spec_set.rb:88:in `map!'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/spec_set.rb:88:in `materialize'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:174:in `specs'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:162:in `resolve_remotely!'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/installer.rb:225:in `resolve_if_need'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/installer.rb:78:in `run'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/installer.rb:24:in `install'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/install.rb:71:in `run'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:189:in `install'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/home/wbrugato/.gem/ruby/2.3.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'
./bin/bundle:3:in `load'
./bin/bundle:3:in `<main>'
Environment
Bundler 1.13.7
Rubygems 2.6.8
Ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
GEM_HOME /home/wbrugato/.gem/ruby/2.3.0
GEM_PATH /home/wbrugato/.gem/ruby/2.3.0:/usr/share/gems:/usr/local/share/gems
Git 2.9.3
Bundler settings
gemfile
Set via BUNDLE_GEMFILE: "/home/wbrugato/RubymineProjects/labels/Gemfile"
答案 0 :(得分:3)
我有类似的问题。清除捆绑器的缓存对我有用。
rm -rf ~/.bundle/cache