2016-10-05 17 views
0

我在本地運行rake send_events,在heroku上運行heroku run rake send_events爲什麼我的請求在本地工作並且不在heroku上?

values = {sendSmsRequest: 
       { 
        from: "ABC", 
        to: "5581999999999", 
        msg: "msg", 
        callbackOption: "NONE", 
        id: "c_1541" 
       } 
} 
headers = { 
    :content_type => 'application/json', 
    :authorization => 'Basic xxxxxxxxxxxxxxxxxxxxxxxx', 
    :accept => 'application/json' 
} 


RestClient.post 'https://api-rest.zenvia360.com.br/services/send-sms', values.to_json, headers 

日誌打印 RestClient::Exceptions::OpenTimeout

感謝。

+0

DId解決了這個問題?我有同樣的問題 – marimaf

回答

0

OpenTimeout意味着rest-client超時嘗試打開到服務器的連接。

您確定服務器已啓動並可從heroku訪問嗎?我無法通過我的計算機或任何我嘗試使用的服務器訪問它。

$ nc -w 10 -v api-rest.zenvia360.com.br 443 
nc: connect to api-rest.zenvia360.com.br port 443 (tcp) timed out 
相關問題