Я использую google-drive-ruby gem для интеграции Google-Drive в мой проект rails. google-drive-ruby gem зависит от времени выполнения от google-api-ruby-client gem.
Я пытаюсь настроить прокси в configure_client метод http_client_adapter.rb
def configure_client(client, request)
client.transparent_gzip_decompression = true
if true #request.options.proxy
#proxy = request.options.proxy
proxy = URI('http://proxy.xyz.com:8080')
proxy_user = '*******'
proxy_pass = '*******'
client.proxy = sprintf('%s:%d', proxy.host, proxy.port)
if proxy_user && proxy_pass
client.set_proxy_auth proxy_user, proxy_pass
end
end
end
Трассировка ошибок ниже:
Google :: Apis :: ServerError: неподдерживаемый прокси # из D: / g_drive_local / BMajor / gems / google-api-ruby-client-0100 / google-api-ruby-client-0.10.0 / lib / google / apis / core / upload.rb: 231: в rescue in send_start_command'
from D:/g_drive_local/BMajor/gems/google-api-ruby-client-0100/google-api-ruby-client-0.10.0/lib/google/apis/core/upload.rb:214:in
send_start_command 'из D: / g_drive_local / BMajor / gems / google-api-ruby-client-0100 / google-api-ruby-client-0.10.0 / lib / google / apis / core / upload.rb: 279: в execute_once'
from D:/g_drive_local/BMajor/gems/google-api-ruby-client-0100/google-api-ruby-client-0.10.0/lib/google/apis/core/http_command.rb:107:in
блоке (2 уровня) в execute 'из D: / Ruby / ruby gems / ruby / lib / ruby / gems/2.0.0/gems/retriable-3.1.2/lib/retriable.rb:61:in block in retriable'
from D:/Ruby/ruby gems/ruby/lib/ruby/gems/2.0.0/gems/retriable-3.1.2/lib/retriable.rb:56:in
раза 'из D: / Ruby / ruby gems / ruby / lib / ruby / gems / 2.0.0 / gems /retriable-3.1.2 / lib / retriable.rb: 56: в retriable'
from D:/g_drive_local/BMajor/gems/google-api-ruby-client-0100/google-api-ruby-client-0.10.0/lib/google/apis/core/http_command.rb:104:in
блок в execute 'из D: / Ruby / ruby gems / ruby / lib / ruby / gems / 2.0.0 / gems / retriable-3.1.2/lib/retriable.rb:61:in block in retriable'
from D:/Ruby/ruby gems/ruby/lib/ruby/gems/2.0.0/gems/retriable-3.1.2/lib/retriable.rb:56:in
раз 'из D: / Ruby / ruby gems / ruby / lib / ruby / gems / 2.0.0 / gems / retriable-3.1.2 / lib / retriable.rb:56: в retriable'
from D:/g_drive_local/BMajor/gems/google-api-ruby-client-0100/google-api-ruby-client-0.10.0/lib/google/apis/core/http_command.rb:96:in
выполнить 'из D: /g_drive_local/BMajor/gems/google-api-ruby-client-0100/google-api-ruby-client-0.10.0/lib/google/apis/core/base_service.rb: 353: в execute_or_queue_command'
from D:/g_drive_local/BMajor/gems/google-api-ruby-client-0100/google-api-ruby-client-0.10.0/generated/google/apis/drive_v3/service.rb:579:in
create_file 'из D: /g_drive_local/BMajor/gems/google-drive-ruby-200/google-drive-ruby-2.0.0/lib/google_drive/session.rb: 409: в upload_from_source'
from D:/g_drive_local/BMajor/gems/google-drive-ruby-200/google-drive-ruby-2.0.0/lib/google_drive/session.rb:308:in
upload_from_file' из (irb): 2 из D: / Ruby / ruby gems / ruby / lib / ruby / gems / 2.0.0 / gems / railties-4.0.4 / lib / rails / commands / console.rb: 90: в start'
from D:/Ruby/ruby gems/ruby/lib/ruby/gems/2.0.0/gems/railties-4.0.4/lib/rails/commands/console.rb:9:in
start 'fromD: / Ruby / ruby gems / ruby / lib / ruby / gems / 2.0.0 / gems / railties-4.0.4 / lib / rails / commands.rb: 62: в <top (required)>'
from bin/rails:4:in
require 'из bin / rails: 4: в `'