Skip to content

Instantly share code, notes, and snippets.

@npatmaja
Created August 25, 2014 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save npatmaja/f29b4c56bf1e235665c7 to your computer and use it in GitHub Desktop.
Save npatmaja/f29b4c56bf1e235665c7 to your computer and use it in GitHub Desktop.
Work around of Errno::EPIPE: Broken pipe while inserting a file through google drive ruby api client

Error found while inserting a file to Google Drive ruby API client:

Errno::EPIPE: Broken pipe
from /Users/nauval/.rbenv/versions/2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:326:in `syswrite'

Work around: Tell the API client to use HTTPClient as Faraday's default adapter after the require google api

require 'google/api_client'
Faraday.default_adapter = :httpclient

Make sure to put the HTTPClient's gem in the Gemfile

gem 'httpclient', '~> 2.4.0'

taken from http://stackoverflow.com/a/25168422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment