youtube_it throws ArgumentError after update to Ruby 2 - how to fix? -
i have application has task scrape site , post video youtube of information grabbed.
after updating application ruby 2, youtube upload stopped working , started showing following:
(argumenterror) "wrong number of arguments (2 0..1)" /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/youtube_it 2.1.13/lib/youtube_it/chain_io.rb:66:in `read' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http/generic_request.rb:202:in `copy_stream' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http/generic_request.rb:202:in `send_request_with_body_stream' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http/generic_request.rb:132:in `exec' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http.rb:1403:in `block in transport_request' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http.rb:1402:in `catch' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http.rb:1402:in `transport_request' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http.rb:1375:in `request' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.0.83/lib/new_relic/agent/instrumentation/net.rb:25:in `block in request_with_newrelic_trace' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.0.83/lib/new_relic/agent/cross_app_tracing.rb:39:in `trace_http_request' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.0.83/lib/new_relic/agent/instrumentation/net.rb:24:in `request_with_newrelic_trace' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http.rb:1368:in `block in request' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http.rb:851:in `start' /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http.rb:1366:in `request' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.0.83/lib/new_relic/agent/instrumentation/net.rb:25:in `block in request_with_newrelic_trace' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.0.83/lib/new_relic/agent/cross_app_tracing.rb:39:in `trace_http_request' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.0.83/lib/new_relic/agent/instrumentation/net.rb:24:in `request_with_newrelic_trace' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in `perform_request' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in `call' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/youtube_it-2.1.13/lib/youtube_it/middleware/faraday_authheader.rb:17:in `call' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in `run_request' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in `post' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/youtube_it-2.1.13/lib/youtube_it/request/video_upload.rb:92:in `upload' /home/deployer/apps/project/shared/bundle/ruby/2.0.0/gems/youtube_it-2.1.13/lib/youtube_it/client.rb:106:in `video_upload' /home/deployer/apps/project/current/app/models/cme_event.rb:169:in `upload_on_youtube'
it's simple silly error number of arguments seems net/http passing 2 arguments function instead of previous one. tried change code on youtube_it gem adding additional optional parameters, still no luck.
so know might have changed net/http on ruby 2 broke this?
this has been fixed in new version of youtube_it gem (2.3.2) see also:
https://github.com/kylejginavan/youtube_it/issues/159 https://github.com/kylejginavan/youtube_it/issues/167
Comments
Post a Comment