twilio / twilio-ruby

A Ruby gem for communicating with the Twilio API and generating TwiML
MIT License
1.35k stars 462 forks source link

"cannot load such file -- rack/media_type" on twilio-ruby v5.63.1 #592

Closed kevin-roe closed 2 years ago

kevin-roe commented 2 years ago

Issue Summary

We have a gem (email_search)that wraps twilio-ruby as a part of our internal testing tools. When we ran a bundle update yesterday and installed version 5.63.1, we received the following error upon attempting to execute our tests: cannot load such file -- rack/media_type. I have included the stack trace below. For the fix we hard coded twilio-ruby to use version 5.63.0 which resolved our issue.

Code Snippet

# email_search-0.3.0/lib/email_search/twilio/client.rb:1
require "twilio-ruby"

Exception/Log

8: from /Users/kevin.roe/.asdf/installs/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/email_search-0.3.0/lib/email_search/twilio/client.rb:1:in `<top (required)>'
7: from /Users/kevin.roe/.asdf/installs/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /Users/kevin.roe/.asdf/installs/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
5: from /Users/kevin.roe/.asdf/installs/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/twilio-ruby-5.63.1/lib/twilio-ruby.rb:13:in `<top (required)>'
4: from /Users/kevin.roe/.asdf/installs/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /Users/kevin.roe/.asdf/installs/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Users/kevin.roe/.asdf/installs/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/twilio-ruby-5.63.1/lib/rack/twilio_webhook_authentication.rb:3:in `<top (required)>'
1: from /Users/kevin.roe/.asdf/installs/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

Technical details:

eshanholtz commented 2 years ago

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

The PR addressing this issue is in our backlog for review.

btalbot commented 2 years ago

Note that this issue doesn't show up in their own testing as their tests explicitly require 'rack' in spec_helper https://github.com/twilio/twilio-ruby/blob/main/spec/spec_helper.rb#L19

childish-sambino commented 2 years ago

Fixed by #602