rest-client-1.8.0 doesn't work with Ruby 2.4.2
Ana06 opened this issue · 3 comments
Ana06 commented
I get the following error wit Ruby Trello 1.5 when using it with Ruby 2.4.2:
> trollolo burndown --plot-to-board
/usr/lib64/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:163:in `fetch': key not found: :ciphers (KeyError)
from /usr/lib64/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:163:in `initialize'
from /usr/lib64/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `new'
from /usr/lib64/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/net.rb:29:in `execute_core'
from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/net.rb:18:in `try_execute'
from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/net.rb:10:in `execute'
from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/client.rb:88:in `invoke_verb'
from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/client.rb:19:in `get'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/trello_wrapper.rb:84:in `get_board'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/trello_wrapper.rb:32:in `retrieve_board_data'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/trello_wrapper.rb:21:in `board'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/burndown_data.rb:96:in `board'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/burndown_data.rb:121:in `get_meta'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/burndown_data.rb:100:in `fetch'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/burndown_chart.rb:200:in `update'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/cli.rb:187:in `burndown'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/bin/trollolo:29:in `<top (required)>'
from /usr/bin/trollolo.ruby2.4:23:in `load'
from /usr/bin/trollolo.ruby2.4:23:in `<main>'
It is coming from rest-client 1.8, so it may be that this is already fixed in newer versions of rest-client and it is enought with changing the actual restriction >=1.8 to >1.8.
3wille commented
Hey @Ana06, please try to manually upgrade rest-client
to verify that a newer version fixes your issue.
gem install rest-client -v '1.9'
or better gem install rest-client -v '2.0.2'
should do this.
If this fixes your issue, you should open a pull request upgrading the version restriction.
PandaWhisperer commented
hilli commented
Setting this before calling rest-client
solved this for me without upgrading. That is, setting the ciper and forcing TLS1.2, which is obviously needed for security.
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_SSLv2
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_SSLv3
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_TLSv1
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_TLSv1_1
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_COMPRESSION
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ciphers] = 'TLSv1.2:!aNULL:!eNULL'
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ssl_version] = 'TLSv1_2'