Vonage / vonage-ruby-sdk

Vonage REST API client for Ruby. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
https://developer.vonage.com
Apache License 2.0
218 stars 105 forks source link

Error on using send_message #44

Closed rush-skills closed 8 years ago

rush-skills commented 8 years ago

Trying to send a sms using nexmo.send_sms, getting the error

/home/ankur/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/uri/generic.rb:1100:in rescue in merge': private methodsend' called for #URI::RFC3986_Parser:0x00000000e2abd0 (NoMethodError)`

This is the code I am using

require 'nexmo' nexmo = Nexmo::Client.new call = nexmo.send_message(from: SENDER, to: MESSAGE_NUMBER, text: message)

NEXMO_API_KEY and NEXMO_API_SECRET variables are available in the environment.

Sending the same request using "Net/HTTP" works properly.

Would love if you can help me out.

timcraft commented 8 years ago

@rush-skills There's no nexmo.send_sms method, you presumably mean nexmo.send_message?

I can't reproduce it and I'm not sure why the error includes URI::RFC3986_Parser when the default is URI::RFC2396_Parser. Are you sure the error is coming from the nexmo gem? If you can't reproduce the issue outside of your application environment (e.g. in a script which only requires nexmo), then it might be a problem with something else in your application.