Closed codeundercoverdev closed 1 year ago
Change this:
client.messages.create({
from: ENV["twilio_phone_number"],
to: self.phone_number,
body: "Hello from ...! Your one-time pin is #{self.one_time_pin}."
})
To this:
client.messages.create(
from: ENV["twilio_phone_number"],
to: self.phone_number,
body: "Hello from ...! Your one-time pin is #{self.one_time_pin}."
)
Note that the second example is not a hash, it is using keyword arguments.
This is caused by the separation of positional and keyword arguments in Ruby 3.
Thanks for the comment @anothermh! @codeundercoverdev Did using the keyword arguments resolve the errors you were seeing?
Closing due to inactivity. Please re-open this issue or open a new GitHub issue if you still need help.
Issue Summary
I was using ruby 2.6.0 and upgraded to Ruby 3.1.3 and now code that has been working for 3 years has broken. I am simply creating an sms message, but I am getting an error. I was using the twilio-ruby gem 5.30.0 but upgraded to 5.74.2 one I found this upgrade. I get the same error with both versions
Steps to Reproduce
Code Snippet
Exception/Log
Technical details: