Ruby on rails Nexmo-Rails中未定义的方法send_消息
我正在尝试使用nexmo gem发送短信 直到几天前,代码还在正常工作。Ruby on rails Nexmo-Rails中未定义的方法send_消息,ruby-on-rails,nexmo,Ruby On Rails,Nexmo,我正在尝试使用nexmo gem发送短信 直到几天前,代码还在正常工作。 def发送短信 @编号=参数[:编号] @nannytel=params[:电话] nexmo=nexmo::Client.new( 关键字:“xxxxxxx”, 秘密:“XXXXXX” ) 通知=“联系电话如下#{@nannytel}” response=nexmo.send\u消息( 发件人:“SENDERID”, 致:@number, 文本:通知 ) 如果响应['messages'].first['status']
def发送短信
@编号=参数[:编号]
@nannytel=params[:电话]
nexmo=nexmo::Client.new(
关键字:“xxxxxxx”,
秘密:“XXXXXX”
)
通知=“联系电话如下#{@nannytel}”
response=nexmo.send\u消息(
发件人:“SENDERID”,
致:@number,
文本:通知
)
如果响应['messages'].first['status']='0'
flash[:success]=“Yayy!请修改以下代码
response = nexmo.sms.send(
from: "SENDERID",
to: @number,
text: notification
)
作为
根据版本5.0.2
或
使用版本4.8
而不是5.0.2
您使用的是哪个版本的nexmo
gem?这是最新版本的5.0.2降级gem完成了任务:)非常感谢Ganesh
response = nexmo.sms.send(
from: "SENDERID",
to: @number,
text: notification
)
gem 'nexmo', '4.8'