-
Notifications
You must be signed in to change notification settings - Fork 472
Closed
Labels
status: waiting for featurefeature will be implemented in the futurefeature will be implemented in the futurestatus: waiting for feedbackwaiting for feedback from the submitterwaiting for feedback from the submittertype: bugbug in the librarybug in the library
Description
Issue Summary
When using 6.0 in an rbenv/bundler setup, this line:
twilio-ruby/lib/twilio-ruby/rest.rb
Line 8 in 1956b94
| require file.gsub('.rb', '_base.rb') unless file.end_with?('client.rb') || file.end_with?('_base.rb') |
mangles paths and thus twilio-ruby can't be used as require "twilio-ruby"
This is because a path like this:
/Users/REDACTED/.rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/twilio-ruby-6.0.0/lib/twilio-ruby/rest/accounts.rb
gets turned into
/Users/REDACTED/.base_rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/twilio-ruby-6.0.0/lib/twilio-ruby/rest/accounts_base.rb
where the .rbenv gets modified into .base_rbenv (when the actual goal was just the filename getting that sub)
Steps to Reproduce
- use rbenv
- install twilio-ruby
- require 'twilio-ruby' ---> it fails
Code Snippet
n/a
Exception/Log
/Users/REDACTED/.rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/twilio-ruby-6.0.0/lib/twilio-ruby/rest/accounts.rb
Traceback (most recent call last):
/Users/REDACTED/.rbenv/versions/2.7.8/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require': cannot load such file -- /Users/REDACTED/_base.rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/twilio-ruby-6.0.0/lib/twilio-ruby/rest/accounts_base.rb (LoadError)
Technical details:
- twilio-ruby version: 6.0.0
- ruby version: ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [arm64-darwin22]
- rbenv version: rbenv 1.2.0
MatzFan
Metadata
Metadata
Assignees
Labels
status: waiting for featurefeature will be implemented in the futurefeature will be implemented in the futurestatus: waiting for feedbackwaiting for feedback from the submitterwaiting for feedback from the submittertype: bugbug in the librarybug in the library