Errno::EIO: Input/output error - sendfile on running bundle install
<p>--- ERROR REPORT TEMPLATE ----------
- What did you do?</p>

<p>I ran the command <code>/home/&lt;machine-name&gt;/.rvm/gems/ruby-2.3.1@appname/bin/bundle</code></p>

<ul>
<li><p>What did you expect to happen?</p>

<p>I expected Bundler to install gems listed in my Gemfile</p></li>
<li><p>What happened instead?</p>

<p>Instead, what happened was...</p></li>
</ul>

<p>Error details</p>

<pre><code>Errno::EIO: Input/output error - sendfile
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1394:in `copy_stream'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1394:in `block (2 levels) in copy_file'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1393:in `open'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1393:in `block in copy_file'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1392:in `open'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1392:in `copy_file'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:486:in `copy_file'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:403:in `block in cp'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1571:in `block in fu_each_src_dest'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1587:in `fu_each_src_dest0'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1569:in `fu_each_src_dest'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:402:in `cp'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:34:in `block in update'
  /home/machine-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in `update'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:65:in `update'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:56:in `update_and_parse_checksums!'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/fetcher/compact_index.rb:67:in `available?'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/fetcher/compact_index.rb:15:in `call'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/fetcher/compact_index.rb:15:in `block in compact_index_request'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/fetcher.rb:157:in `use_api'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/source/rubygems.rb:332:in `block in api_fetchers'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/source/rubygems.rb:332:in `select'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/source/rubygems.rb:332:in `api_fetchers'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/source/rubygems.rb:337:in `block in remote_specs'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/index.rb:10:in `build'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/source/rubygems.rb:336:in `remote_specs'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/source/rubygems.rb:83:in `specs'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/definition.rb:261:in `block (2 levels) in index'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/definition.rb:259:in `each'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/definition.rb:259:in `block in index'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/index.rb:10:in `build'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/definition.rb:256:in `index'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/definition.rb:250:in `resolve'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/definition.rb:174:in `specs'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/definition.rb:162:in `resolve_remotely!'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/installer.rb:225:in `resolve_if_need'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/installer.rb:78:in `run'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/installer.rb:24:in `install'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/cli/install.rb:71:in `run'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/cli.rb:189:in `install'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/cli.rb:20:in `dispatch'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/cli.rb:11:in `start'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/exe/bundle:34:in `block in &lt;top (required)&gt;'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/gems/bundler-1.13.6/exe/bundle:26:in `&lt;top (required)&gt;'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/bin/bundle:23:in `load'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/bin/bundle:23:in `&lt;main&gt;'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/bin/ruby_executable_hooks:15:in `eval'
  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
</code></pre>

<p>Environment</p>

<p>Bundler   1.13.6
  Rubygems  2.5.1
  Ruby      2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
  GEM_HOME  /home/machine-name/.rvm/gems/ruby-2.3.1@app-name
  GEM_PATH  /home/machine-name/.rvm/gems/ruby-2.3.1@app-     name:/home/machine-name/.rvm/gems/ruby-2.3.1@global
  RVM       1.27.0 (latest)
  Git       2.7.4
  rubygems-bundler (1.4.4)</p>

<p>===================TEMPLATE END===========================</p>

<p>I tried running bundle on other existing and new projects, bundle runs fine.</p>

<p>Here is my Gemfile.rb</p>

<pre><code>source 'https://rubygems.org'
ruby '2.3.1'
gem 'rails', '4.2.5'
gem 'sass-rails', '~&gt; 5.0'
gem 'uglifier', '&gt;= 1.3.0'
gem 'coffee-rails', '~&gt; 4.1.0'
gem 'jquery-rails'
gem 'jbuilder', '~&gt; 2.0'
gem 'pg'
gem 'annotate'
gem 'rubyzip', '&gt;= 1.0.0' # will load new rubyzip version
gem 'zip-zip' # will load compatibility for old rubyzip API.
gem 'whenever', require: false
# gem 'zip'
gem 'kaminari' # pagination
gem 'ransack'
group :development, :test do
gem 'byebug'
gem 'pry-rails'
end
group :development do
 gem 'web-console', '~&gt; 2.0'
 gem 'spring'
end
gem 'bootstrap-sass'
gem 'devise'
gem 'high_voltage'
gem 'thin'
gem 'httparty'
gem 'sidekiq'
gem 'redis'
group :development do
 gem 'better_errors'
gem 'binding_of_caller', platforms: [:mri_19]
gem 'rails_layout'
gem 'spring-commands-rspec'
gem 'pry'
end
group :development, :test do
 gem 'factory_girl_rails'
gem 'faker'
gem 'rspec-rails'
gem 'sqlite3'
end
group :production do
 gem 'rails_12factor'
end
group :test do
 gem 'capybara'
 gem 'database_cleaner'
 gem 'launchy'
 gem 'selenium-webdriver'
end
</code></pre>

<p>PLEASE Help me.</p>

<p><strong>EDIT ONE</strong></p>

<p>I have these gems in my gemfile </p>

<p><code>gem 'kaminari' # pagination
 gem 'ransack'
 gem 'sidekiq'
 gem 'redis'</code></p>

<p>When I remove these gems, bundle works fine.
So what could be the error and what should I do to have these gems?</p>