我在使用捆绑安装方面遇到了一些问题。我使用Ruby和Rbenv。我尝试创建一个空目录(gem文件除外,其中包含一个列出的gem)并设置其权限以允许任何人创建和修改文件和文件夹,但它仍然无法正常工作。 Rails安装工作,直到它运行Bundler为止。
有些人在之前的问题上建议使用sudo bundler install(虽然注意它不是永久修复)但是我找不到命令,并且我担心使用sudo安装gem。有可用于RVM的权限修复,但由于我使用rbenv,这些并不太有帮助。
我真的被困在这里了。我已经尝试过使用Ruby 2.3.0和2.3.1。
这是我的错误输出:
Error details
Errno::EIO: Input/output error @ io_fread - /home/my_username/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/info/rspec-mocks
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:77:in `read'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:77:in `checksum_for_file'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:70:in `update_info'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:43:in `block in dependencies'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:88:in `block (3 levels) in compact_index_client'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/worker.rb:65:in `apply_func'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/worker.rb:60:in `block in process_queue'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/worker.rb:57:in `loop'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/worker.rb:57:in `process_queue'
/home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/worker.rb:29:in `block (2 levels) in initialize'
Environment
Bundler 1.12.5
Rubygems 2.5.1
Ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
GEM_HOME /home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0
GEM_PATH /home/my_username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0:/home/my_username/.gem/ruby/2.3.0
Git 1.9.1
Bundler settings
gem.test
Set for the current user (/home/my_username/.bundle/config): "minitest"
gem.mit
Set for the current user (/home/my_username/.bundle/config): "false"
gem.coc
Set for the current user (/home/my_username/.bundle/config): "false"
orig_path
Set via BUNDLE_ORIG_PATH: "/home/my_username/.rbenv/versions/2.3.0/bin:/home/my_username/.rbenv/libexec:/home/my_username/.rbenv/plugins/ruby-build/bin:/usr/local/heroku/bin:/home/my_username/.rbenv/plugins/ruby-build/bin:/home/my_username/.rbenv/shims:/home/my_username/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"