iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 21
9

昨天我們把聊天機器人 webhook 串好了,今天我們要讓機器人回覆訊息。

我們先來看看我們能不能正常的收到訂閱通知,我說的訂閱通知是在第五天:認識 Line Messaging API Webhook 介紹到的各種通知。

我們可以看在 heroku 上的 rails server 小黑框來觀察。

觀察 heroku 上的伺服器運作記錄

當我們在小黑框輸入 heroku logs -t 時,跟我們在小黑框輸入 rails server 有 87% 像,當有人開啟網頁時,就會看到運作紀錄(log)。

D:\只要有心,人人都可以作卡米狗\ironman>heroku logs -t

先開個小黑框輸入 heroku logs -t 之後放著。

觀察 Line developer 後台的 verify

我們先回到 Line developer 後台,點一下昨天點過的 verify,看看 Line 到底傳了什麼給我們的伺服器。

2018-01-08T15:04:43.091880+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 21213 -e production`
2018-01-08T15:04:50.486685+00:00 app[web.1]: => Booting Puma
2018-01-08T15:04:50.486716+00:00 app[web.1]: => Rails 5.1.4 application starting in production
2018-01-08T15:04:50.486718+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-01-08T15:04:50.486719+00:00 app[web.1]: Puma starting in single mode...
2018-01-08T15:04:50.486725+00:00 app[web.1]: * Version 3.11.0 (ruby 2.3.4-p301), codename: Love Song
2018-01-08T15:04:50.486733+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-01-08T15:04:50.486735+00:00 app[web.1]: * Environment: production
2018-01-08T15:04:50.486886+00:00 app[web.1]: * Listening on tcp://0.0.0.0:21213
2018-01-08T15:04:50.487396+00:00 app[web.1]: Use Ctrl-C to stop
2018-01-08T15:04:38.156226+00:00 heroku[web.1]: Unidling
2018-01-08T15:04:38.156470+00:00 heroku[web.1]: State changed from down to starting
2018-01-08T15:04:52.254468+00:00 app[web.1]: I, [2018-01-08T15:04:52.254363 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c] Started POST "/kamigo/webhook" for 203.104.156.74 at 2018-01-08 15:04:52 +0000
2018-01-08T15:04:52.276728+00:00 app[web.1]: I, [2018-01-08T15:04:52.276573 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c] Processing by KamigoController#webhook as HTML
2018-01-08T15:04:52.277008+00:00 app[web.1]: I, [2018-01-08T15:04:52.276880 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c]   Parameters: {"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}], "kamigo"=>{"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}]}}
2018-01-08T15:04:52.297993+00:00 app[web.1]: W, [2018-01-08T15:04:52.297845 #4]  WARN -- : [34361d41-4be8-4293-971d-eca0151ea11c] Can't verify CSRF token authenticity.
2018-01-08T15:04:52.298635+00:00 app[web.1]: I, [2018-01-08T15:04:52.298565 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c] Completed 200 OK in 21ms
2018-01-08T15:04:52.306974+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo.herokuapp.com request_id=34361d41-4be8-4293-971d-eca0151ea11c fwd="203.104.156.74" dyno=web.1 connect=0ms service=56ms status=200 bytes=289 protocol=https

我們需要看懂這些東西,我們一次讀一段,慢慢讀完。

第一行:

2018-01-08T15:04:43.091880+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 21213 -e production`

這行就是我們平常在小黑框輸入的 rails server,heroku 上也需要輸入這行,但這是由 heroku 自動幫我們輸入。

heroku 的免費伺服器有一個缺點,如果連續 30 分鐘都沒人連到我們的網頁伺服器,他就會自動關機。當他處於關機狀態時,如果有人連到我們的伺服器,那他就會把我們的網頁伺服器叫醒。

2018-01-08T15:04:50.486685+00:00 app[web.1]: => Booting Puma
2018-01-08T15:04:50.486716+00:00 app[web.1]: => Rails 5.1.4 application starting in production
2018-01-08T15:04:50.486718+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-01-08T15:04:50.486719+00:00 app[web.1]: Puma starting in single mode...
2018-01-08T15:04:50.486725+00:00 app[web.1]: * Version 3.11.0 (ruby 2.3.4-p301), codename: Love Song
2018-01-08T15:04:50.486733+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-01-08T15:04:50.486735+00:00 app[web.1]: * Environment: production
2018-01-08T15:04:50.486886+00:00 app[web.1]: * Listening on tcp://0.0.0.0:21213
2018-01-08T15:04:50.487396+00:00 app[web.1]: Use Ctrl-C to stop

這是我們平常下 rails server 指令時會看到的訊息。

2018-01-08T15:04:38.156226+00:00 heroku[web.1]: Unidling
2018-01-08T15:04:38.156470+00:00 heroku[web.1]: State changed from down to starting

heroku 的狀態從關機變成開始運作中。

2018-01-08T15:04:52.254468+00:00 app[web.1]: I, [2018-01-08T15:04:52.254363 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c] Started POST "/kamigo/webhook" for 203.104.156.74 at 2018-01-08 15:04:52 +0000
2018-01-08T15:04:52.276728+00:00 app[web.1]: I, [2018-01-08T15:04:52.276573 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c] Processing by KamigoController#webhook as HTML
2018-01-08T15:04:52.277008+00:00 app[web.1]: I, [2018-01-08T15:04:52.276880 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c]   Parameters: {"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}], "kamigo"=>{"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}]}}
2018-01-08T15:04:52.297993+00:00 app[web.1]: W, [2018-01-08T15:04:52.297845 #4]  WARN -- : [34361d41-4be8-4293-971d-eca0151ea11c] Can't verify CSRF token authenticity.
2018-01-08T15:04:52.298635+00:00 app[web.1]: I, [2018-01-08T15:04:52.298565 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c] Completed 200 OK in 21ms

每一行的開頭都有這個:

2018-01-08T15:04:52.254468+00:00 app[web.1]: I, [2018-01-08T15:04:52.254363 #4]  INFO -- : [34361d41-4be8-4293-971d-eca0151ea11c]

這不是很重要,因為會妨礙閱讀,所以我們先忽略他,以下是忽略後的結果:

Started POST "/kamigo/webhook" for 203.104.156.74 at 2018-01-08 15:04:52 +0000
Processing by KamigoController#webhook as HTML
  Parameters: {"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}], "kamigo"=>{"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1515423877419, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}]}}
Can't verify CSRF token authenticity.
Completed 200 OK in 21ms

這看起來就有點眼熟了。

他打了一個 POST 到我們的 /kamigo/webhook,並且傳了這樣的參數:

{
  "events"=>[
    {
      "replyToken"=>"00000000000000000000000000000000", 
      "type"=>"message", 
      "timestamp"=>1515423877419, 
      "source"=>{
        "type"=>"user", 
        "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"
      }, 
      "message"=>{
        "id"=>"100001", 
        "type"=>"text", 
        "text"=>"Hello, world"
      }
    }, 
    {
      "replyToken"=>"ffffffffffffffffffffffffffffffff", 
      "type"=>"message", 
      "timestamp"=>1515423877419, 
      "source"=>{
        "type"=>"user", 
        "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"
      }, 
      "message"=>{
        "id"=>"100002", 
        "type"=>"sticker", 
        "packageId"=>"1", 
        "stickerId"=>"1"
      }
    }
  ], 
  "kamigo"=>{
    "events"=>[
      {
        "replyToken"=>"00000000000000000000000000000000", 
        "type"=>"message", 
        "timestamp"=>1515423877419, 
        "source"=>{
          "type"=>"user", 
          "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"
        }, 
        "message"=>{
          "id"=>"100001", 
          "type"=>"text", 
          "text"=>"Hello, world"
        }
      }, 
      {
        "replyToken"=>"ffffffffffffffffffffffffffffffff", 
        "type"=>"message", 
        "timestamp"=>1515423877419, 
        "source"=>{
          "type"=>"user", 
          "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"
        }, 
        "message"=>{
          "id"=>"100002", 
          "type"=>"sticker", 
          "packageId"=>"1", 
          "stickerId"=>"1"
        }
      }
    ]
  }
}

解讀 POST BODY

經過我精美的排版之後變得比較好閱讀了,這是一個很大的 Ruby hash(雜湊陣列),我們在第十三天:認識 Ruby 的資料型態學過這個。我把這個 hash 存成檔案,名叫 line_verify.rb,這麼作有一些好處,sublime text 會幫文字加顏色,以及可以使用縮小/展開功能。

這個 hash 有兩個 key,分別是 events 和 kamigo,events 是一個陣列,而 kamigo 是一個 hash。

kamigo 是一個只有一個 key 的 hash,而這個 key 也叫作,events。更巧的是,這兩個 events 裡面包含的資料是相同的,所以我們只要看其中一個 events 就好。

這個 events 陣列,包含兩個 hash。這個 hash 我們在第五天:認識 Line Messaging API Webhook 時已經介紹過了。這裡再簡單複習一下:

  • replyToken:是我們要回覆訊息時必須傳回的值,他代表收件者以及你的回覆權。
  • type:通知類型,這是一則訊息
  • timestamp:傳送時間,我們通常會忽略他
  • source:發信者
  • message:訊息內容

接下來看第一個 hash 裡的 source 和 message。

"source"=>{
  "type"=>"user", 
  "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"
}

這是發生在私訊對話框,對方的 id 是 Udeadbeefdeadbeefdeadbeefdeadbeef。

"message"=>{
  "id"=>"100001", 
  "type"=>"text", 
  "text"=>"Hello, world"
}

對方傳來的訊息是文字訊息:「Hello, world」。

再看第二個 hash。第二個 hash 裡的 source 跟第一個一樣,所以我們只需要看 message 的部分。

"message"=>{
  "id"=>"100002", 
  "type"=>"sticker", 
  "packageId"=>"1", 
  "stickerId"=>"1"
}

對方傳來的訊息是貼圖訊息。

觀察實際傳遞的訊息

讓我們試著用 Line 傳訊息給我們的聊天機器人,看看會收到什麼:

看看小黑框,什麼事也沒發生。原來是 Line developer 後台還有東西沒設定。

這兩個分別是使用 Webhook可被邀請進群,都把他打開。

都開啟後的樣子:

都開啟後再次傳訊息就會在小黑框看到:

{
  "events"=>[
    {
      "type"=>"message", 
      "replyToken"=>"1d0bc2113fd344deb8131750e8d2daa2", 
      "source"=>{
        "userId"=>"Uc68d82df46b7899e7d716f396ae8e91a", 
        "type"=>"user"
      }, 
      "timestamp"=>1515432401148, 
      "message"=>{
        "type"=>"text", 
        "id"=>"7279127481400", 
        "text"=>"五五六六得第一"
      }
    }
  ]
}

我把不重要的部分都刪除了,剩下來的部分看起來差不多,應該不用多作解釋,現在我們來作回覆訊息。

回覆訊息

安裝 Line Bot API

我們要先安裝一個 Line 提供的 gem,在 Gemfile 加入以下程式:

# line
gem 'line-bot-api'

記得要在小黑框輸入 bundle 下載套件。

引入 Line Bot API

修改 app/controllers/kamigo_controller.rb 檔,在第一行加上require 'line/bot'

require 'line/bot'

這表示我們要使用 Line 的套件。

修改 webhook

這個是 webhook 寫好的樣子,我會慢慢解釋他。

def webhook
  # Line Bot API 物件初始化
  client = Line::Bot::Client.new { |config|
    config.channel_secret = '9160ce4f0be51cc72c3c8a14119f567a'
    config.channel_token = '2ncMtCFECjdTVmopb/QSD1PhqM6ECR4xEqC9uwIzELIsQb+I4wa/s3pZ4BH8hCWeqfkpVGVig/mIPDsMjVcyVbN/WNeTTw5eHEA7hFhaxPmQSY2Cud51LKPPiXY+nUi+QrXy0d7Hi2YUs65B/tVOpgdB04t89/1O/w1cDnyilFU='
  }
  
  # 取得 reply token
  reply_token = params['events'][0]['replyToken']

  # 設定回覆訊息
  message = {
    type: 'text',
    text: '好哦~好哦~'
  }

  # 傳送訊息
  response = client.reply_message(reply_token, message)
    
  # 回應 200
  head :ok
end 

Line Bot API 物件初始化

  client = Line::Bot::Client.new { |config|
    config.channel_secret = '9160ce4f0be51cc72c3c8a14119f567a'
    config.channel_token = '2ncMtCFECjdTVmopb/QSD1PhqM6ECR4xEqC9uwIzELIsQb+I4wa/s3pZ4BH8hCWeqfkpVGVig/mIPDsMjVcyVbN/WNeTTw5eHEA7hFhaxPmQSY2Cud51LKPPiXY+nUi+QrXy0d7Hi2YUs65B/tVOpgdB04t89/1O/w1cDnyilFU='
  }

這段程式是我們使用 Line Bot API 內提供的物件,需要傳入兩個字串分別為 Channel secretChannel access token

你可以在 Line Developer 後台找到他們:

只要按下 Issue 按鈕,值就會變。

取得 reply token

reply_token = params['events'][0]['replyToken']

根據剛剛我們觀察的 hash 結構,我們大膽假設 events 陣列裡只有一筆資料,用 [0] 取得第一筆,然後取得他裡面的 replyToken

設定回覆訊息

  message = {
    type: 'text',
    text: '好哦~好哦~'
  }

我們回覆的訊息是純文字訊息,內容是「好哦~好哦~」

傳送訊息

response = client.reply_message(reply_token, message)

我們透過 Line Bot API 包裝好的函數來回覆訊息,這樣我們就不用去寫在第十六天:做一個最簡單的爬蟲寫過的那些東西。

對一下程式碼

這是完整的 app/controllers/kamigo_controller.rb 檔內容:

require 'line/bot'
class KamigoController < ApplicationController
  protect_from_forgery with: :null_session

  def webhook
    # Line Bot API 物件初始化
    client = Line::Bot::Client.new { |config|
      config.channel_secret = '9160ce4f0be51cc72c3c8a14119f567a'
      config.channel_token = '2ncMtCFECjdTVmopb/QSD1PhqM6ECR4xEqC9uwIzELIsQb+I4wa/s3pZ4BH8hCWeqfkpVGVig/mIPDsMjVcyVbN/WNeTTw5eHEA7hFhaxPmQSY2Cud51LKPPiXY+nUi+QrXy0d7Hi2YUs65B/tVOpgdB04t89/1O/w1cDnyilFU='
    }
    
    # 取得 reply token
    reply_token = params['events'][0]['replyToken']

    # 設定回覆訊息
    message = {
      type: 'text',
      text: '好哦~好哦~'
    }

    # 傳送訊息
    response = client.reply_message(reply_token, message)
      
    # 回應 200
    head :ok
  end 

  ...下略

end

上傳程式碼

確認沒問題之後,因為我們沒辦法進行本地端的測試,所以就直接上傳程式碼:

git add .
git commit -m "回覆訊息"
git push heroku master

上傳完成後進行測試。

實測

耶~我們終於作出最簡單的回應了。

如果你沒有辦法順利抵達這裡,那麼你有幾個可以作的事情,你可以讓 heroku logs -t 打出你想知道的內容。比方說,你想知道你的 reply_token 有沒有抓對:

    # 取得 reply token
    reply_token = params['events'][0]['replyToken']
    
    p "======這裡是 reply_token ======"
    p reply_token 
    p "============"

像這樣加上幾行 p,接著只要對 Line Bot 傳訊息,你就能在小黑框看到這個:

你可以把所有的變數都用 p 印出來慢慢看,看是不是你想要的值。其中最值得觀察的變數是 response

如果你看不懂,可以對 logs 截圖在底下留言。

總結

  • 你知道不同的通知只有些許差異。
  • 你看懂通知傳遞的內容,以及如何用程式碼擷取出他的值
  • 你學會了使用套件
  • 你學會了怎麼讓 Line Bot 回覆訊息
  • 你學會了在 heroku 上的除錯方法

明天之後就會越來越難了,要寫的程式會越來越多。這裡有一些 Ruby 的基礎教學,有興趣的人可以補一下:

為你自己學 Ruby on Rails - 變數、常數、流程控制、迴圈

為你自己學 Ruby on Rails - 數字、字串、陣列、範圍、雜湊、符號

為你自己學 Ruby on Rails - 方法與程式碼區塊(block)

為你自己學 Ruby on Rails - 類別(Class)與模組(Module)


上一篇
第二十天:串接 Line Messaging API Webhook
下一篇
第二十二天:用 Line Messaging API 實作關鍵字回覆
系列文
只要有心,人人都可以做卡米狗33
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
1
jerryw47
iT邦新手 5 級 ‧ 2018-01-09 11:42:45

想請問一下,channel_secret and channel_token是按照你上面的輸入嗎?https://ithelp.ithome.com.tw/upload/images/20180109/20107956z7lrzKAr5S.png
因為我的line developer只有 secret
https://ithelp.ithome.com.tw/upload/images/20180109/20107956OuC7zgeQ5u.png

看更多先前的回應...收起先前的回應...
C. T. Lin iT邦新手 5 級 ‧ 2018-01-09 11:49:14 檢舉

按 Issue 應該就會出現

jerryw47 iT邦新手 5 級 ‧ 2018-01-09 12:18:05 檢舉

有出現,感謝你

不要輸入我的 /images/emoticon/emoticon41.gif

q81086 iT邦新手 5 級 ‧ 2018-01-10 00:36:53 檢舉

感謝有你~讓我對這方面有興趣。每天都要來看一發XD

有你們的支持,我也比較有動力繼續寫下去/images/emoticon/emoticon37.gif

nt31824 iT邦新手 5 級 ‧ 2018-03-13 11:44:57 檢舉

我也輸入你的 笑死

0
nt31824
iT邦新手 5 級 ‧ 2018-03-13 11:49:24

請問卡米大
https://ithelp.ithome.com.tw/upload/images/20180313/20108969WJGbCQOUAu.png
連到本機測試
https://ithelp.ithome.com.tw/upload/images/20180313/20108969bdgyd0yhIi.png
Sublime Text的部分
https://ithelp.ithome.com.tw/upload/images/20180313/20108969b8HwfDVo0Y.png
https://ithelp.ithome.com.tw/upload/images/20180313/20108969gKV9ndDcTf.png

現在機器人都不回應 請問卡米大是否哪裡有問題

看更多先前的回應...收起先前的回應...
nt31824 iT邦新手 5 級 ‧ 2018-03-13 11:51:02 檢舉

.

看起來是 heroku 上的 server crash 了,但你沒有截到重點畫面。重點在 heroku logs,可以補上完整的嗎?

nt31824 iT邦新手 5 級 ‧ 2018-03-13 15:18:02 檢舉

https://ithelp.ithome.com.tw/upload/images/20180313/20108969z4zk1irmD4.png

這是輸入heroku logs 黑窗給我的回應
但我跟機器人說話他還是會出現
https://ithelp.ithome.com.tw/upload/images/20180313/20108969YQcQdnwWOE.png

對 你還是沒拍到上面的重點,log 很長。

nt31824 iT邦新手 5 級 ‧ 2018-03-13 19:17:34 檢舉

這是今天再用出來的LOG

2018-03-18T06:12:42.488046+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=93f571e4-fe90-4e1a-9bc2-7725c8c60326 fwd="203.104.146.153" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T06:29:09.144510+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=b9f5e7c0-2f53-4b7a-a71e-bc2906f799b3 fwd="203.104.146.153" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T06:29:13.356720+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=5594a4d6-8a14-44e5-a100-27443aa5e7c8 fwd="203.104.146.153" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T10:49:00.173892+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=0ff2ee05-995a-4446-927e-d4304a5150f4 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T10:49:11.012706+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=b3f3f1ec-d582-480e-a5fe-a3f7069b0914 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T10:52:28.176966+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=faeefa45-bbe6-44b4-ab18-e15fbc949a64 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T10:58:15.710619+00:00 heroku[web.1]: State changed from crashed to starting
2018-03-18T10:58:19.977852+00:00 heroku[web.1]: Starting process with command bin/rails server -p 46857 -e production
2018-03-18T10:58:25.188417+00:00 heroku[web.1]: Process exited with status 1
2018-03-18T10:58:25.202491+00:00 heroku[web.1]: State changed from starting to crashed
2018-03-18T10:58:25.095839+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:292:in require': /app/app/controllers/Kamigo_Controller.rb:30: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError) 2018-03-18T10:58:25.095895+00:00 app[web.1]: end 2018-03-18T10:58:25.095916+00:00 app[web.1]: ^ 2018-03-18T10:58:25.095945+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:292:in block in require'
2018-03-18T10:58:25.095999+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:258:in load_dependency' 2018-03-18T10:58:25.096025+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:292:in require'
2018-03-18T10:58:25.096053+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:379:in block in require_or_load' 2018-03-18T10:58:25.096080+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:36:in block in load_interlock'
2018-03-18T10:58:25.096106+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies/interlock.rb:12:in block in loading' 2018-03-18T10:58:25.096162+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/concurrency/share_lock.rb:149:in exclusive'
2018-03-18T10:58:25.096189+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies/interlock.rb:11:in loading' 2018-03-18T10:58:25.096215+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:36:in load_interlock'
2018-03-18T10:58:25.096292+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:251:in require_dependency' 2018-03-18T10:58:25.096241+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:357:in require_or_load'
2018-03-18T10:58:25.096266+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:335:in depend_on' 2018-03-18T10:58:25.096347+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/engine.rb:476:in block (2 levels) in eager_load!'
2018-03-18T10:58:25.096370+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/engine.rb:475:in each' 2018-03-18T10:58:25.096415+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/engine.rb:473:in each'
2018-03-18T10:58:25.096392+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/engine.rb:475:in block in eager_load!' 2018-03-18T10:58:25.096462+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/engine.rb:354:in eager_load!'
2018-03-18T10:58:25.096439+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/engine.rb:473:in eager_load!' 2018-03-18T10:58:25.096544+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/application/finisher.rb:67:in block in module:Finisher'
2018-03-18T10:58:25.096518+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/application/finisher.rb:67:in each' 2018-03-18T10:58:25.096620+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/initializable.rb:59:in block in run_initializers'
2018-03-18T10:58:25.096570+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/initializable.rb:30:in instance_exec' 2018-03-18T10:58:25.096697+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component'
2018-03-18T10:58:25.096748+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' 2018-03-18T10:58:25.096594+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/initializable.rb:30:in run'
2018-03-18T10:58:25.096659+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each' 2018-03-18T10:58:25.096770+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in each'
2018-03-18T10:58:25.096722+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from' 2018-03-18T10:58:25.096792+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in call'
2018-03-18T10:58:25.096870+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' 2018-03-18T10:58:25.096929+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/initializable.rb:58:in run_initializers'
2018-03-18T10:58:25.096816+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component' 2018-03-18T10:58:25.096953+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/application.rb:353:in initialize!'
2018-03-18T10:58:25.096904+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:205:in tsort_each' 2018-03-18T10:58:25.096980+00:00 app[web.1]: from /app/config/environment.rb:5:in <top (required)>'
2018-03-18T10:58:25.097033+00:00 app[web.1]: from config.ru:3:in require_relative' 2018-03-18T10:58:25.097112+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in initialize'
2018-03-18T10:58:25.097139+00:00 app[web.1]: from config.ru:in new' 2018-03-18T10:58:25.097061+00:00 app[web.1]: from config.ru:3:in block in '
2018-03-18T10:58:25.097241+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in new_from_string' 2018-03-18T10:58:25.097087+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in instance_eval'
2018-03-18T10:58:25.097268+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:40:in parse_file' 2018-03-18T10:58:25.097317+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:219:in app'
2018-03-18T10:58:25.097177+00:00 app[web.1]: from config.ru:in <main>' 2018-03-18T10:58:25.097215+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in eval'
2018-03-18T10:58:25.097292+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:319:in build_app_and_options_from_config' 2018-03-18T10:58:25.097394+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:354:in wrapped_app'
2018-03-18T10:58:25.097356+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:24:in app' 2018-03-18T10:58:25.097420+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:283:in start'
2018-03-18T10:58:25.097469+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:135:in block in perform' 2018-03-18T10:58:25.097492+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:130:in tap'
2018-03-18T10:58:25.097515+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:130:in perform' 2018-03-18T10:58:25.097568+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
2018-03-18T10:58:25.097446+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:44:in start' 2018-03-18T10:58:25.097591+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command'
2018-03-18T10:58:25.097614+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch' 2018-03-18T10:58:25.097635+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/command/base.rb:63:in perform'
2018-03-18T10:58:25.097657+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/command.rb:44:in invoke' 2018-03-18T10:58:25.097680+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.5/lib/rails/commands.rb:16:in <top (required)>'
2018-03-18T10:58:25.097762+00:00 app[web.1]: from bin/rails:4:in <main>' 2018-03-18T10:58:25.097736+00:00 app[web.1]: from bin/rails:4:in require'
2018-03-18T10:58:25.113898+00:00 app[web.1]: => Booting Puma
2018-03-18T10:58:25.113906+00:00 app[web.1]: Exiting
2018-03-18T10:58:25.113903+00:00 app[web.1]: => Rails 5.1.5 application starting in production
2018-03-18T10:58:25.113905+00:00 app[web.1]: => Run rails server -h for more startup options
2018-03-18T12:13:12.242308+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=91f8e1d1-f22d-4eb3-99dc-96f5290bbd50 fwd="203.104.146.153" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T12:47:51.439729+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=5fa635f6-2967-44b5-a3bf-85c22615f3a5 fwd="203.104.146.153" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T12:51:27.375230+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=826e051f-7eeb-43ab-b4b6-f4dce2210932 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T12:59:43.130389+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=fcb51a42-8288-4fe8-87bb-3a223be8d8d8 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T13:28:05.601074+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=da60c1be-679d-4fe3-be53-93bd80336a77 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:00:50.987455+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=3460d182-3047-4b14-8505-9cd1bbd990e4 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:01:11.335992+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=45f44f8a-8b2b-433a-ab64-3f97ad57db82 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:01:16.278122+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=02c36360-3c42-4473-8be7-370ad9d40e5c fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:01:31.489166+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=7176ac2f-41e1-4860-b907-e30dea6275f3 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:01:36.305503+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=322da259-ee88-4320-9f26-0b437aaf7d58 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:01:51.828277+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=c43f110d-3eea-4038-8351-24b36eb7c562 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:01:52.580972+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=fb67439a-515f-4884-8352-0caf931ebb77 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:02:06.177722+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=a6589c40-3ba2-4cb3-bd52-92aa3b5a2ef5 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:04:53.921230+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=cb848d83-fb1f-4d2c-9e6c-920abe572598 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:05:05.503096+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=07ad9416-f898-4795-ae06-0967c2c4a09b fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:07:53.902660+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=2920f962-26cb-4807-a906-4181fba9ea20 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:08:13.399093+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=fcc178b5-bd16-48dd-945c-e70acc658471 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:08:39.254448+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=2d0bdcb7-ae69-4cc9-993d-f0dc9a4eef61 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:09:29.858720+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=de66abe5-e462-4a6d-88a5-97273d363b20 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T15:09:37.327499+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=a74aaefd-2db7-44b3-ba92-d0d7fb138a45 fwd="203.104.146.152" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T16:15:28.307046+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=39947a45-9cfa-4e14-953b-2e2421e4fb2d fwd="203.104.146.153" dyno= connect= service= status=503 bytes= protocol=https
2018-03-18T16:15:31.963952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/kamigo/webhook" host=ssu-hua-kaka-3393.herokuapp.com request_id=9f517e5f-1f53-49b1-8b8c-5492313088d6 fwd="203.104.146.153" dyno= connect= service= status=503 bytes= protocol=https

nt31824 iT邦新手 5 級 ‧ 2018-03-13 19:18:12 檢舉

麻煩卡米大了

我知道了 你的小黑框記憶體不夠長 所以無法顯示完整的log。

nt31824 iT邦新手 5 級 ‧ 2018-03-15 21:19:40 檢舉

我有把他弄到記事本上 請問卡米大有取到嗎? 如果沒有我在找

你在小黑框的視窗左上角 logo 的部分按右鍵內容,找到版面配置分頁,把螢幕緩衝區大小改成9999

https://ithelp.ithome.com.tw/upload/images/20180316/20107309fR20XyohbF.jpg

nt31824 iT邦新手 5 級 ‧ 2018-03-16 16:55:45 檢舉

好 謝謝卡米大

nt31824 iT邦新手 5 級 ‧ 2018-03-16 19:16:12 檢舉

回報一下卡米大 請問 heroku logs -T是在專案資料夾下執行嗎?
目前輸入heroku logs -T取得的資訊跟上面貼的那張一樣
有什麼資訊的關鍵字嗎?

在你修改完緩衝區之後,你應該可以看到更多訊息。

nt31824 iT邦新手 5 級 ‧ 2018-03-24 18:46:18 檢舉

https://ithelp.ithome.com.tw/upload/images/20180324/20108969ZbZfmNzwIF.png

我都要哭了 終於過了21天!!!!! 感恩卡米大 讚嘆卡米大!!

XD 所以是 end 的問題嗎

0
nt31824
iT邦新手 5 級 ‧ 2018-03-13 13:26:34

.

nt31824 iT邦新手 5 級 ‧ 2018-04-01 20:54:08 檢舉

END跟上傳程式碼的問題~~~~ 這幾天比較忙 今天才有空再用

0
jimmymn10
iT邦新手 5 級 ‧ 2018-03-24 17:35:31

你好,想請問一下
無法回復出OKOKOK是哪個地方出錯了
這是log跟bot_controller.rb的內容 感謝
https://ithelp.ithome.com.tw/upload/images/20180324/20109228HHxjnJTasf.pnghttps://ithelp.ithome.com.tw/upload/images/20180324/20109228041wABclM1.png

Line::Bot::Client 不是 Line::Client 喔,在 log 裡面有一行寫著 NameError (uninitialized constant Line::Client) 意思是他不認識 Line::Client

jimmymn10 iT邦新手 5 級 ‧ 2018-03-25 13:15:32 檢舉

瞭解了 自己眼殘沒發現 謝謝幫忙

XD

0
Doli
iT邦新手 5 級 ‧ 2018-03-31 17:19:25

卡卡米你好我的LINE可以回應但是網頁開不起來,請問是哪邊有問題?
https://ithelp.ithome.com.tw/upload/images/20180331/20109159OTWraZd203.png

https://ithelp.ithome.com.tw/upload/images/20180331/20109159DLr8B1W9kM.png

https://ithelp.ithome.com.tw/upload/images/20180331/201091598aKtehFDIO.png

看更多先前的回應...收起先前的回應...

這個問題還會發生嗎? 我懷疑是 line 的問題

Doli iT邦新手 5 級 ‧ 2018-04-02 10:08:15 檢舉

直接開網頁的話會顯示這樣
https://ithelp.ithome.com.tw/upload/images/20180402/20109159Kqcxit2Tc4.png

但在POSTMAN裡是這樣
https://ithelp.ithome.com.tw/upload/images/20180402/20109159YuM4on5OM5.png

然後看到(之前是正常的不知道為什麼又不行)
https://ithelp.ithome.com.tw/upload/images/20180402/201091598Yyv9SEZI5.png

之前會回 好哦~好哦 但是現在不行
https://ithelp.ithome.com.tw/upload/images/20180402/20109159X7imJC8Db2.png

網頁開不起來是正常的,因為我們做的是只接受 POST, 但是瀏覽器是用 GET。

在 postman,如果你沒有指定傳入正確的資料,那麼 server 這邊會出錯是正常的。

所以只需要看 heroku 這邊。

建議你用 heroku logs -t 去看 log 有沒有異常。

Doli iT邦新手 5 級 ‧ 2018-04-02 20:04:48 檢舉

找到了!!是我的程式碼有地方打錯

0
kenneth8701
iT邦新手 5 級 ‧ 2018-04-11 22:10:57

請問機器人無法回應怎麼辦?
D:\pockybot\ironman>heroku logs -t
2018-04-11T13:24:08.312346+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}'
2018-04-11T13:24:08.312348+00:00 app[web.1]: ...bPEMLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:24:08.312351+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tCONSTANT, expecting '}'
2018-04-11T13:24:08.312350+00:00 app[web.1]: ... ^
2018-04-11T13:24:08.312353+00:00 app[web.1]: ...MLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:24:08.312355+00:00 app[web.1]: ... ^
2018-04-11T13:24:08.312357+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:10: syntax error, unexpected '}'
2018-04-11T13:24:08.312358+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:26: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:24:08.312360+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:70: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:24:08.312362+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in block in require' 2018-04-11T13:24:08.312363+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in load_dependency'
2018-04-11T13:24:08.312365+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in require' 2018-04-11T13:24:08.312367+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:379:in block in require_or_load'
2018-04-11T13:24:08.312369+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in block in load_interlock' 2018-04-11T13:24:08.312370+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:12:in block in loading'
2018-04-11T13:24:08.312378+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:11:in loading' 2018-04-11T13:24:08.312376+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/concurrency/share_lock.rb:149:in exclusive'
2018-04-11T13:24:08.312379+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in load_interlock' 2018-04-11T13:24:08.312381+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:357:in require_or_load'
2018-04-11T13:24:08.312384+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:251:in require_dependency' 2018-04-11T13:24:08.312382+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:335:in depend_on'
2018-04-11T13:24:08.312385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:476:in block (2 levels) in eager_load!' 2018-04-11T13:24:08.312387+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in each'
2018-04-11T13:24:08.312389+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in block in eager_load!' 2018-04-11T13:24:08.312390+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in each'
2018-04-11T13:24:08.312397+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:354:in eager_load!' 2018-04-11T13:24:08.312395+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in eager_load!'
2018-04-11T13:24:08.312399+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in each' 2018-04-11T13:24:08.312400+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in block in module:Finisher'
2018-04-11T13:24:08.312402+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in instance_exec' 2018-04-11T13:24:08.312403+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in run'
2018-04-11T13:24:08.312405+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in block in run_initializers' 2018-04-11T13:24:08.312432+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each'
2018-04-11T13:24:08.312433+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' 2018-04-11T13:24:08.312435+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
2018-04-11T13:24:08.312437+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' 2018-04-11T13:24:08.312439+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each'
2018-04-11T13:24:08.312440+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in call' 2018-04-11T13:24:08.312442+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component'
2018-04-11T13:24:08.312443+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' 2018-04-11T13:24:08.312445+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:205:in tsort_each'
2018-04-11T13:24:08.312446+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in run_initializers' 2018-04-11T13:24:08.312448+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application.rb:353:in initialize!'
2018-04-11T13:24:08.312450+00:00 app[web.1]: from /app/config/environment.rb:5:in <top (required)>' 2018-04-11T13:24:08.312454+00:00 app[web.1]: from config.ru:3:in require_relative'
2018-04-11T13:24:08.312456+00:00 app[web.1]: from config.ru:3:in block in <main>' 2018-04-11T13:24:08.312457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in instance_eval'
2018-04-11T13:24:08.312459+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in initialize' 2018-04-11T13:24:08.312461+00:00 app[web.1]: from config.ru:in new'
2018-04-11T13:24:08.312462+00:00 app[web.1]: from config.ru:in <main>' 2018-04-11T13:24:08.312464+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in eval'
2018-04-11T13:24:08.312465+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in new_from_string' 2018-04-11T13:24:08.312469+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:40:in parse_file'
2018-04-11T13:24:08.312471+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:319:in build_app_and_options_from_config' 2018-04-11T13:24:08.312473+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:219:in app'
2018-04-11T13:24:08.312474+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in app' 2018-04-11T13:24:08.312476+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:354:in wrapped_app'
2018-04-11T13:24:08.312477+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:283:in start' 2018-04-11T13:24:08.312481+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:44:in start'
2018-04-11T13:24:08.312483+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in block in perform' 2018-04-11T13:24:08.312485+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in tap'
2018-04-11T13:24:08.312486+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in perform' 2018-04-11T13:24:08.312490+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
2018-04-11T13:24:08.312491+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' 2018-04-11T13:24:08.312493+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
2018-04-11T13:24:08.312496+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in perform' 2018-04-11T13:24:08.312498+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in invoke'
2018-04-11T13:24:08.312502+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in <top (required)>' 2018-04-11T13:24:08.312503+00:00 app[web.1]: from bin/rails:4:in require'
2018-04-11T13:24:08.312506+00:00 app[web.1]: from bin/rails:4:in <main>' 2018-04-11T13:24:08.323239+00:00 app[web.1]: => Booting Puma 2018-04-11T13:24:08.323246+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T13:24:08.323249+00:00 app[web.1]: => Run rails server -hfor more startup options 2018-04-11T13:24:08.323250+00:00 app[web.1]: Exiting 2018-04-11T13:24:08.417528+00:00 heroku[web.1]: Process exited with status 1 2018-04-11T13:24:08.434697+00:00 heroku[web.1]: State changed from starting to crashed 2018-04-11T13:24:09.531344+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=fe426099-9132-4b4d-ba95-544f32ef6890 fwd="203.104.156.76" dyno= connect= service= status=503 bytes= protocol=https 2018-04-11T13:27:43.343007+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=66f32161-97ab-4971-bd36-5a8d2203978f fwd="203.104.156.74" dyno= connect= service= status=503 bytes= protocol=https 2018-04-11T13:30:02.000000+00:00 app[api]: Build started by user kenneth87012@hotmail.com 2018-04-11T13:30:24.005879+00:00 heroku[web.1]: State changed from crashed to starting 2018-04-11T13:30:23.786825+00:00 app[api]: Release v12 created by user kenneth87012@hotmail.com 2018-04-11T13:30:23.786825+00:00 app[api]: Deploy f32f45f1 by user kenneth87012@hotmail.com 2018-04-11T13:30:02.000000+00:00 app[api]: Build succeeded 2018-04-11T13:30:26.928307+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 12013 -e production2018-04-11T13:30:30.254032+00:00 app[web.1]: => Booting Puma 2018-04-11T13:30:30.254050+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T13:30:30.254052+00:00 app[web.1]: => Runrails server -hfor more startup options 2018-04-11T13:30:30.254054+00:00 app[web.1]: Puma starting in single mode... 2018-04-11T13:30:30.254061+00:00 app[web.1]: * Version 3.11.3 (ruby 2.3.7-p456), codename: Love Song 2018-04-11T13:30:30.254063+00:00 app[web.1]: * Min threads: 5, max threads: 5 2018-04-11T13:30:30.254065+00:00 app[web.1]: * Environment: production 2018-04-11T13:30:30.254168+00:00 app[web.1]: * Listening on tcp://0.0.0.0:12013 2018-04-11T13:30:30.254645+00:00 app[web.1]: Use Ctrl-C to stop 2018-04-11T13:30:30.857289+00:00 heroku[web.1]: State changed from starting to up 2018-04-11T13:31:32.039791+00:00 heroku[router]: at=info method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=be010ece-34d3-454e-ba31-b90235f4b273 fwd="203.104.156.75" dyno=web.1 connect=0ms service=19ms status=200 bytes=289 protocol=https 2018-04-11T13:31:32.023619+00:00 app[web.1]: I, [2018-04-11T13:31:32.023472 #4] INFO -- : [be010ece-34d3-454e-ba31-b90235f4b273] Started POST "/pockybot/webhook" for 203.104.156.75 at 2018-04-11 13:31:32 +0000 2018-04-11T13:31:32.029067+00:00 app[web.1]: I, [2018-04-11T13:31:32.028991 #4] INFO -- : [be010ece-34d3-454e-ba31-b90235f4b273] Processing by PockybotController#webhook as HTML 2018-04-11T13:31:32.029230+00:00 app[web.1]: I, [2018-04-11T13:31:32.029158 #4] INFO -- : [be010ece-34d3-454e-ba31-b90235f4b273] Parameters: {"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1523453491375, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1523453491375, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}], "pockybot"=>{"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1523453491375, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1523453491375, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}]}} 2018-04-11T13:31:32.038019+00:00 app[web.1]: W, [2018-04-11T13:31:32.037939 #4] WARN -- : [be010ece-34d3-454e-ba31-b90235f4b273] Can't verify CSRF token authenticity. 2018-04-11T13:31:32.038394+00:00 app[web.1]: I, [2018-04-11T13:31:32.038328 #4] INFO -- : [be010ece-34d3-454e-ba31-b90235f4b273] Completed 200 OK in 9ms 2018-04-11T13:32:01.189678+00:00 heroku[router]: at=info method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=813e1168-d6e5-49c3-b8fa-224fb7c38124 fwd="203.104.156.73" dyno=web.1 connect=0ms service=6ms status=200 bytes=289 protocol=https 2018-04-11T13:32:01.185448+00:00 app[web.1]: I, [2018-04-11T13:32:01.185323 #4] INFO -- : [813e1168-d6e5-49c3-b8fa-224fb7c38124] Started POST "/pockybot/webhook" for 203.104.156.73 at 2018-04-11 13:32:01 +0000 2018-04-11T13:32:01.187450+00:00 app[web.1]: I, [2018-04-11T13:32:01.187367 #4] INFO -- : [813e1168-d6e5-49c3-b8fa-224fb7c38124] Processing by PockybotController#webhook as HTML 2018-04-11T13:32:01.187990+00:00 app[web.1]: I, [2018-04-11T13:32:01.187910 #4] INFO -- : [813e1168-d6e5-49c3-b8fa-224fb7c38124] Parameters: {"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1523453520549, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1523453520549, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}], "pockybot"=>{"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1523453520549, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1523453520549, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}]}} 2018-04-11T13:32:01.188596+00:00 app[web.1]: W, [2018-04-11T13:32:01.188517 #4] WARN -- : [813e1168-d6e5-49c3-b8fa-224fb7c38124] Can't verify CSRF token authenticity. 2018-04-11T13:32:01.189046+00:00 app[web.1]: I, [2018-04-11T13:32:01.188969 #4] INFO -- : [813e1168-d6e5-49c3-b8fa-224fb7c38124] Completed 200 OK in 1ms 2018-04-11T13:40:43.715379+00:00 heroku[router]: at=info method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=666b6594-975d-4cdd-8955-141cfbd68b3b fwd="203.104.146.156" dyno=web.1 connect=1ms service=4ms status=200 bytes=289 protocol=https 2018-04-11T13:40:43.712118+00:00 app[web.1]: I, [2018-04-11T13:40:43.712011 #4] INFO -- : [666b6594-975d-4cdd-8955-141cfbd68b3b] Started POST "/pockybot/webhook" for 203.104.146.156 at 2018-04-11 13:40:43 +0000 2018-04-11T13:40:43.713236+00:00 app[web.1]: I, [2018-04-11T13:40:43.713160 #4] INFO -- : [666b6594-975d-4cdd-8955-141cfbd68b3b] Processing by PockybotController#webhook as */* 2018-04-11T13:40:43.713348+00:00 app[web.1]: I, [2018-04-11T13:40:43.713274 #4] INFO -- : [666b6594-975d-4cdd-8955-141cfbd68b3b] Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"1ca49a0c9e154a498016ad113741b302", "source"=>{"userId"=>"U12bf2235858139f93702942230eb5662", "type"=>"user"}, "timestamp"=>1523454042864, "message"=>{"type"=>"text", "id"=>"7777917024408", "text"=>"哈哈"}}], "pockybot"=>{"events"=>[{"type"=>"message", "replyToken"=>"1ca49a0c9e154a498016ad113741b302", "source"=>{"userId"=>"U12bf2235858139f93702942230eb5662", "type"=>"user"}, "timestamp"=>1523454042864, "message"=>{"type"=>"text", "id"=>"7777917024408", "text"=>"哈哈"}}]}} 2018-04-11T13:40:43.713698+00:00 app[web.1]: W, [2018-04-11T13:40:43.713614 #4] WARN -- : [666b6594-975d-4cdd-8955-141cfbd68b3b] Can't verify CSRF token authenticity. 2018-04-11T13:40:43.713958+00:00 app[web.1]: I, [2018-04-11T13:40:43.713882 #4] INFO -- : [666b6594-975d-4cdd-8955-141cfbd68b3b] Completed 200 OK in 0ms 2018-04-11T13:46:38.000000+00:00 app[api]: Build started by user kenneth87012@hotmail.com 2018-04-11T13:46:59.796135+00:00 heroku[web.1]: Restarting 2018-04-11T13:46:59.796135+00:00 heroku[web.1]: State changed from up to starting 2018-04-11T13:46:59.332435+00:00 app[api]: Deploy 6d2b5744 by user kenneth87012@hotmail.com 2018-04-11T13:46:59.332435+00:00 app[api]: Release v13 created by user kenneth87012@hotmail.com 2018-04-11T13:47:00.660947+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish 2018-04-11T13:47:00.675726+00:00 app[web.1]: === puma shutdown: 2018-04-11 13:47:00 +0000 === 2018-04-11T13:47:00.675734+00:00 app[web.1]: - Goodbye! 2018-04-11T13:47:00.675857+00:00 app[web.1]: Exiting 2018-04-11T13:47:00.647835+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2018-04-11T13:47:00.746753+00:00 heroku[web.1]: Process exited with status 143 2018-04-11T13:46:38.000000+00:00 app[api]: Build succeeded 2018-04-11T13:47:03.484877+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 52643 -e production2018-04-11T13:47:07.964113+00:00 heroku[web.1]: Process exited with status 1 2018-04-11T13:47:07.869683+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:inrequire': /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}' (SyntaxError)
2018-04-11T13:47:07.869710+00:00 app[web.1]: ...9TLuznDrpFXPoDULfxwRRZpktu6fjek+j4KqAItPAjNspKY3l+8ppjMOrPbP...
2018-04-11T13:47:07.869711+00:00 app[web.1]: ... ^
2018-04-11T13:47:07.869713+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}'
2018-04-11T13:47:07.869715+00:00 app[web.1]: ...bPEMLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:47:07.869717+00:00 app[web.1]: ... ^
2018-04-11T13:47:07.869719+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tCONSTANT, expecting '}'
2018-04-11T13:47:07.869720+00:00 app[web.1]: ...MLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:47:07.869722+00:00 app[web.1]: ... ^
2018-04-11T13:47:07.869723+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:10: syntax error, unexpected '}'
2018-04-11T13:47:07.869725+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:26: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:47:07.869726+00:00 app[web.1]: end
2018-04-11T13:47:07.869728+00:00 app[web.1]: ^
2018-04-11T13:47:07.869729+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:70: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:47:07.869731+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in block in require' 2018-04-11T13:47:07.869733+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in load_dependency'
2018-04-11T13:47:07.869734+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in require' 2018-04-11T13:47:07.869736+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:379:in block in require_or_load'
2018-04-11T13:47:07.869737+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in block in load_interlock' 2018-04-11T13:47:07.869739+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:12:in block in loading'
2018-04-11T13:47:07.869744+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/concurrency/share_lock.rb:149:in exclusive' 2018-04-11T13:47:07.869745+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:11:in loading'
2018-04-11T13:47:07.869747+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in load_interlock' 2018-04-11T13:47:07.869748+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:357:in require_or_load'
2018-04-11T13:47:07.869750+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:335:in depend_on' 2018-04-11T13:47:07.869751+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:251:in require_dependency'
2018-04-11T13:47:07.869753+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:476:in block (2 levels) in eager_load!' 2018-04-11T13:47:07.869755+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in each'
2018-04-11T13:47:07.869756+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in block in eager_load!' 2018-04-11T13:47:07.869758+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in each'
2018-04-11T13:47:07.869762+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in eager_load!' 2018-04-11T13:47:07.869764+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:354:in eager_load!'
2018-04-11T13:47:07.869765+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in each' 2018-04-11T13:47:07.869767+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in block in module:Finisher'
2018-04-11T13:47:07.869768+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in instance_exec' 2018-04-11T13:47:07.869770+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in run'
2018-04-11T13:47:07.869771+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in block in run_initializers' 2018-04-11T13:47:07.869775+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each'
2018-04-11T13:47:07.869794+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' 2018-04-11T13:47:07.869795+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
2018-04-11T13:47:07.869797+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' 2018-04-11T13:47:07.869798+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each'
2018-04-11T13:47:07.869803+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in call' 2018-04-11T13:47:07.869805+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component'
2018-04-11T13:47:07.869806+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' 2018-04-11T13:47:07.869808+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:205:in tsort_each'
2018-04-11T13:47:07.869809+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in run_initializers' 2018-04-11T13:47:07.869811+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application.rb:353:in initialize!'
2018-04-11T13:47:07.869812+00:00 app[web.1]: from /app/config/environment.rb:5:in <top (required)>' 2018-04-11T13:47:07.869814+00:00 app[web.1]: from config.ru:3:in require_relative'
2018-04-11T13:47:07.869815+00:00 app[web.1]: from config.ru:3:in block in <main>' 2018-04-11T13:47:07.869819+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in instance_eval'
2018-04-11T13:47:07.869820+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in initialize' 2018-04-11T13:47:07.869822+00:00 app[web.1]: from config.ru:in new'
2018-04-11T13:47:07.869823+00:00 app[web.1]: from config.ru:in <main>' 2018-04-11T13:47:07.869825+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in eval'
2018-04-11T13:47:07.869828+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in new_from_string' 2018-04-11T13:47:07.869830+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:40:in parse_file'
2018-04-11T13:47:07.869831+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:319:in build_app_and_options_from_config' 2018-04-11T13:47:07.869868+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:219:in app'
2018-04-11T13:47:07.869871+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in app' 2018-04-11T13:47:07.869872+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:354:in wrapped_app'
2018-04-11T13:47:07.869878+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:283:in start' 2018-04-11T13:47:07.869880+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:44:in start'
2018-04-11T13:47:07.869882+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in block in perform' 2018-04-11T13:47:07.869883+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in tap'
2018-04-11T13:47:07.869886+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in perform' 2018-04-11T13:47:07.869888+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
2018-04-11T13:47:07.869889+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' 2018-04-11T13:47:07.869891+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
2018-04-11T13:47:07.869895+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in perform' 2018-04-11T13:47:07.869896+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in invoke'
2018-04-11T13:47:07.869926+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in <top (required)>' 2018-04-11T13:47:07.869928+00:00 app[web.1]: from bin/rails:4:in require'
2018-04-11T13:47:07.869933+00:00 app[web.1]: from bin/rails:4:in <main>' 2018-04-11T13:47:07.880789+00:00 app[web.1]: => Booting Puma 2018-04-11T13:47:07.880793+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T13:47:07.880795+00:00 app[web.1]: => Run rails server -hfor more startup options 2018-04-11T13:47:07.880796+00:00 app[web.1]: Exiting 2018-04-11T13:47:08.135346+00:00 heroku[web.1]: State changed from starting to crashed 2018-04-11T13:47:08.138195+00:00 heroku[web.1]: State changed from crashed to starting 2018-04-11T13:47:11.509243+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 40631 -e production2018-04-11T13:47:14.768430+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:inrequire': /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}' (SyntaxError)
2018-04-11T13:47:14.768450+00:00 app[web.1]: ...9TLuznDrpFXPoDULfxwRRZpktu6fjek+j4KqAItPAjNspKY3l+8ppjMOrPbP...
2018-04-11T13:47:14.768451+00:00 app[web.1]: ... ^
2018-04-11T13:47:14.768453+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}'
2018-04-11T13:47:14.768454+00:00 app[web.1]: ...bPEMLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:47:14.768455+00:00 app[web.1]: ... ^
2018-04-11T13:47:14.768456+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tCONSTANT, expecting '}'
2018-04-11T13:47:14.768457+00:00 app[web.1]: ...MLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:47:14.768458+00:00 app[web.1]: ... ^
2018-04-11T13:47:14.768459+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:10: syntax error, unexpected '}'
2018-04-11T13:47:14.768461+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:26: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:47:14.768462+00:00 app[web.1]: end
2018-04-11T13:47:14.768463+00:00 app[web.1]: ^
2018-04-11T13:47:14.768464+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:70: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:47:14.768465+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in block in require' 2018-04-11T13:47:14.768467+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in load_dependency'
2018-04-11T13:47:14.768468+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in require' 2018-04-11T13:47:14.768469+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:379:in block in require_or_load'
2018-04-11T13:47:14.768470+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in block in load_interlock' 2018-04-11T13:47:14.768471+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:12:in block in loading'
2018-04-11T13:47:14.768472+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/concurrency/share_lock.rb:149:in exclusive' 2018-04-11T13:47:14.768473+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:11:in loading'
2018-04-11T13:47:14.768474+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in load_interlock' 2018-04-11T13:47:14.768475+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:357:in require_or_load'
2018-04-11T13:47:14.768478+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:335:in depend_on' 2018-04-11T13:47:14.768529+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:251:in require_dependency'
2018-04-11T13:47:14.768530+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:476:in block (2 levels) in eager_load!' 2018-04-11T13:47:14.768531+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in each'
2018-04-11T13:47:14.768533+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in block in eager_load!' 2018-04-11T13:47:14.768534+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in each'
2018-04-11T13:47:14.768535+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in eager_load!' 2018-04-11T13:47:14.768536+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:354:in eager_load!'
2018-04-11T13:47:14.768537+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in each' 2018-04-11T13:47:14.768538+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in block in module:Finisher'
2018-04-11T13:47:14.768539+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in instance_exec' 2018-04-11T13:47:14.768540+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in run'
2018-04-11T13:47:14.768541+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in block in run_initializers' 2018-04-11T13:47:14.768542+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each'
2018-04-11T13:47:14.768544+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' 2018-04-11T13:47:14.768545+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
2018-04-11T13:47:14.768546+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' 2018-04-11T13:47:14.768547+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each'
2018-04-11T13:47:14.768551+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in call' 2018-04-11T13:47:14.768612+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component'
2018-04-11T13:47:14.768613+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' 2018-04-11T13:47:14.768616+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:205:in tsort_each'
2018-04-11T13:47:14.768617+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in run_initializers' 2018-04-11T13:47:14.768618+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application.rb:353:in initialize!'
2018-04-11T13:47:14.768620+00:00 app[web.1]: from /app/config/environment.rb:5:in <top (required)>' 2018-04-11T13:47:14.768621+00:00 app[web.1]: from config.ru:3:in require_relative'
2018-04-11T13:47:14.768622+00:00 app[web.1]: from config.ru:3:in block in <main>' 2018-04-11T13:47:14.768625+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in instance_eval'
2018-04-11T13:47:14.768626+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in initialize' 2018-04-11T13:47:14.768629+00:00 app[web.1]: from config.ru:in new'
2018-04-11T13:47:14.768630+00:00 app[web.1]: from config.ru:in <main>' 2018-04-11T13:47:14.768632+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in eval'
2018-04-11T13:47:14.768633+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in new_from_string' 2018-04-11T13:47:14.768634+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:40:in parse_file'
2018-04-11T13:47:14.768636+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:319:in build_app_and_options_from_config' 2018-04-11T13:47:14.768638+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:219:in app'
2018-04-11T13:47:14.768640+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in app' 2018-04-11T13:47:14.768641+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:354:in wrapped_app'
2018-04-11T13:47:14.768643+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:283:in start' 2018-04-11T13:47:14.768645+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:44:in start'
2018-04-11T13:47:14.768647+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in block in perform' 2018-04-11T13:47:14.768649+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in tap'
2018-04-11T13:47:14.768652+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in perform' 2018-04-11T13:47:14.768653+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
2018-04-11T13:47:14.768655+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' 2018-04-11T13:47:14.768656+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
2018-04-11T13:47:14.768659+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in perform' 2018-04-11T13:47:14.768660+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in invoke'
2018-04-11T13:47:14.768662+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in <top (required)>' 2018-04-11T13:47:14.768663+00:00 app[web.1]: from bin/rails:4:in require'
2018-04-11T13:47:14.768665+00:00 app[web.1]: from bin/rails:4:in <main>' 2018-04-11T13:47:14.777039+00:00 app[web.1]: => Booting Puma 2018-04-11T13:47:14.777042+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T13:47:14.777043+00:00 app[web.1]: => Run rails server -hfor more startup options 2018-04-11T13:47:14.777045+00:00 app[web.1]: Exiting 2018-04-11T13:47:14.880041+00:00 heroku[web.1]: State changed from starting to crashed 2018-04-11T13:47:14.857014+00:00 heroku[web.1]: Process exited with status 1 2018-04-11T13:47:29.504544+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=48e7f8ee-f40c-4af9-840d-03e13fa1470e fwd="203.104.146.156" dyno= connect= service= status=503 bytes= protocol=https 2018-04-11T13:49:14.000000+00:00 app[api]: Build started by user kenneth87012@hotmail.com 2018-04-11T13:49:36.519609+00:00 heroku[web.1]: State changed from crashed to starting 2018-04-11T13:49:35.740623+00:00 app[api]: Release v14 created by user kenneth87012@hotmail.com 2018-04-11T13:49:14.000000+00:00 app[api]: Build succeeded 2018-04-11T13:49:39.644699+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 41251 -e production2018-04-11T13:49:43.402268+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:inrequire': /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}' (SyntaxError)
2018-04-11T13:49:43.516362+00:00 heroku[web.1]: State changed from starting to crashed
2018-04-11T13:49:43.497624+00:00 heroku[web.1]: Process exited with status 1
2018-04-11T13:49:43.402289+00:00 app[web.1]: ...9TLuznDrpFXPoDULfxwRRZpktu6fjek+j4KqAItPAjNspKY3l+8ppjMOrPbP...
2018-04-11T13:49:43.402291+00:00 app[web.1]: ... ^
2018-04-11T13:49:43.402293+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}'
2018-04-11T13:49:43.402295+00:00 app[web.1]: ...bPEMLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:49:43.402297+00:00 app[web.1]: ... ^
2018-04-11T13:49:43.402299+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tCONSTANT, expecting '}'
2018-04-11T13:49:43.402300+00:00 app[web.1]: ...MLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:49:43.402302+00:00 app[web.1]: ... ^
2018-04-11T13:49:43.402304+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:10: syntax error, unexpected '}'
2018-04-11T13:49:43.402305+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:30: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:49:43.402307+00:00 app[web.1]: end
2018-04-11T13:49:43.402309+00:00 app[web.1]: ^
2018-04-11T13:49:43.402316+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:74: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:49:43.402319+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in block in require' 2018-04-11T13:49:43.402321+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in load_dependency'
2018-04-11T13:49:43.402323+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in require' 2018-04-11T13:49:43.402325+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:379:in block in require_or_load'
2018-04-11T13:49:43.402327+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in block in load_interlock' 2018-04-11T13:49:43.402403+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:12:in block in loading'
2018-04-11T13:49:43.402407+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/concurrency/share_lock.rb:149:in exclusive' 2018-04-11T13:49:43.402408+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:11:in loading'
2018-04-11T13:49:43.402410+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in load_interlock' 2018-04-11T13:49:43.402411+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:357:in require_or_load'
2018-04-11T13:49:43.402412+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:335:in depend_on' 2018-04-11T13:49:43.402413+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:251:in require_dependency'
2018-04-11T13:49:43.402414+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:476:in block (2 levels) in eager_load!' 2018-04-11T13:49:43.402416+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in each'
2018-04-11T13:49:43.402417+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in block in eager_load!' 2018-04-11T13:49:43.402418+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in each'
2018-04-11T13:49:43.402419+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in eager_load!' 2018-04-11T13:49:43.402420+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:354:in eager_load!'
2018-04-11T13:49:43.402421+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in each' 2018-04-11T13:49:43.402422+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in block in module:Finisher'
2018-04-11T13:49:43.402424+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in instance_exec' 2018-04-11T13:49:43.402425+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in run'
2018-04-11T13:49:43.402426+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in block in run_initializers' 2018-04-11T13:49:43.402427+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each'
2018-04-11T13:49:43.402428+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' 2018-04-11T13:49:43.402429+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
2018-04-11T13:49:43.402430+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' 2018-04-11T13:49:43.402431+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each'
2018-04-11T13:49:43.402437+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in call' 2018-04-11T13:49:43.402438+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component'
2018-04-11T13:49:43.402439+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' 2018-04-11T13:49:43.402440+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:205:in tsort_each'
2018-04-11T13:49:43.402441+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in run_initializers' 2018-04-11T13:49:43.402442+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application.rb:353:in initialize!'
2018-04-11T13:49:43.402444+00:00 app[web.1]: from /app/config/environment.rb:5:in <top (required)>' 2018-04-11T13:49:43.402445+00:00 app[web.1]: from config.ru:3:in require_relative'
2018-04-11T13:49:43.402446+00:00 app[web.1]: from config.ru:3:in block in <main>' 2018-04-11T13:49:43.402447+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in instance_eval'
2018-04-11T13:49:43.402448+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in initialize' 2018-04-11T13:49:43.402449+00:00 app[web.1]: from config.ru:in new'
2018-04-11T13:49:43.402450+00:00 app[web.1]: from config.ru:in <main>' 2018-04-11T13:49:43.402452+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in eval'
2018-04-11T13:49:43.402453+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in new_from_string' 2018-04-11T13:49:43.402454+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:40:in parse_file'
2018-04-11T13:49:43.402455+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:319:in build_app_and_options_from_config' 2018-04-11T13:49:43.402456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:219:in app'
2018-04-11T13:49:43.402457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in app' 2018-04-11T13:49:43.402458+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:354:in wrapped_app'
2018-04-11T13:49:43.402459+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:283:in start' 2018-04-11T13:49:43.402460+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:44:in start'
2018-04-11T13:49:43.402461+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in block in perform' 2018-04-11T13:49:43.402462+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in tap'
2018-04-11T13:49:43.402463+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in perform' 2018-04-11T13:49:43.402464+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
2018-04-11T13:49:43.402466+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' 2018-04-11T13:49:43.402467+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
2018-04-11T13:49:43.402468+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in perform' 2018-04-11T13:49:43.402469+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in invoke'
2018-04-11T13:49:43.402471+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in <top (required)>' 2018-04-11T13:49:43.402472+00:00 app[web.1]: from bin/rails:4:in require'
2018-04-11T13:49:43.402473+00:00 app[web.1]: from bin/rails:4:in <main>' 2018-04-11T13:49:43.413773+00:00 app[web.1]: => Booting Puma 2018-04-11T13:49:43.413780+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T13:49:43.413782+00:00 app[web.1]: => Run rails server -hfor more startup options 2018-04-11T13:49:43.413784+00:00 app[web.1]: Exiting 2018-04-11T13:49:35.740623+00:00 app[api]: Deploy a5d687a3 by user kenneth87012@hotmail.com 2018-04-11T13:49:54.520523+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=0963c5d9-34d0-4175-b888-5cb07656b891 fwd="203.104.146.156" dyno= connect= service= status=503 bytes= protocol=https 2018-04-11T13:54:01.000000+00:00 app[api]: Build started by user kenneth87012@hotmail.com 2018-04-11T13:54:21.989695+00:00 app[api]: Release v15 created by user kenneth87012@hotmail.com 2018-04-11T13:54:21.989695+00:00 app[api]: Deploy 6e2ba41a by user kenneth87012@hotmail.com 2018-04-11T13:54:23.010283+00:00 heroku[web.1]: State changed from crashed to starting 2018-04-11T13:54:01.000000+00:00 app[api]: Build succeeded 2018-04-11T13:54:27.413647+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 11513 -e production2018-04-11T13:54:32.514996+00:00 heroku[web.1]: Process exited with status 1 2018-04-11T13:54:32.386111+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:inrequire': /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}' (SyntaxError)
2018-04-11T13:54:32.386160+00:00 app[web.1]: ...9TLuznDrpFXPoDULfxwRRZpktu6fjek+j4KqAItPAjNspKY3l+8ppjMOrPbP...
2018-04-11T13:54:32.386162+00:00 app[web.1]: ... ^
2018-04-11T13:54:32.386164+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}'
2018-04-11T13:54:32.386166+00:00 app[web.1]: ...bPEMLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:54:32.386167+00:00 app[web.1]: ... ^
2018-04-11T13:54:32.386169+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tCONSTANT, expecting '}'
2018-04-11T13:54:32.386170+00:00 app[web.1]: ...MLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=
2018-04-11T13:54:32.386172+00:00 app[web.1]: ... ^
2018-04-11T13:54:32.386174+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:10: syntax error, unexpected '}'
2018-04-11T13:54:32.386175+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:30: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:54:32.386177+00:00 app[web.1]: end
2018-04-11T13:54:32.386178+00:00 app[web.1]: ^
2018-04-11T13:54:32.386194+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:74: syntax error, unexpected keyword_end, expecting '}'
2018-04-11T13:54:32.386216+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in block in require' 2018-04-11T13:54:32.386236+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in load_dependency'
2018-04-11T13:54:32.386254+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in require' 2018-04-11T13:54:32.386273+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:379:in block in require_or_load'
2018-04-11T13:54:32.386293+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in block in load_interlock' 2018-04-11T13:54:32.386313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:12:in block in loading'
2018-04-11T13:54:32.386332+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/concurrency/share_lock.rb:149:in exclusive' 2018-04-11T13:54:32.386352+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:11:in loading'
2018-04-11T13:54:32.386370+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:36:in load_interlock' 2018-04-11T13:54:32.386389+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:357:in require_or_load'
2018-04-11T13:54:32.386407+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:335:in depend_on' 2018-04-11T13:54:32.386426+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:251:in require_dependency'
2018-04-11T13:54:32.386444+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:476:in block (2 levels) in eager_load!' 2018-04-11T13:54:32.386463+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in each'
2018-04-11T13:54:32.386482+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:475:in block in eager_load!' 2018-04-11T13:54:32.386501+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in each'
2018-04-11T13:54:32.386519+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:473:in eager_load!' 2018-04-11T13:54:32.386538+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/engine.rb:354:in eager_load!'
2018-04-11T13:54:32.386561+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in each' 2018-04-11T13:54:32.386580+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:67:in block in module:Finisher'
2018-04-11T13:54:32.386600+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in instance_exec' 2018-04-11T13:54:32.386623+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in run'
2018-04-11T13:54:32.386642+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in block in run_initializers' 2018-04-11T13:54:32.386660+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each'
2018-04-11T13:54:32.386678+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' 2018-04-11T13:54:32.386697+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
2018-04-11T13:54:32.386716+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' 2018-04-11T13:54:32.386734+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each'
2018-04-11T13:54:32.386753+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in call' 2018-04-11T13:54:32.386771+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component'
2018-04-11T13:54:32.386789+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' 2018-04-11T13:54:32.386808+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:205:in tsort_each'
2018-04-11T13:54:32.386826+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in run_initializers' 2018-04-11T13:54:32.386844+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application.rb:353:in initialize!'
2018-04-11T13:54:32.386863+00:00 app[web.1]: from /app/config/environment.rb:5:in <top (required)>' 2018-04-11T13:54:32.386882+00:00 app[web.1]: from config.ru:3:in require_relative'
2018-04-11T13:54:32.386958+00:00 app[web.1]: from config.ru:3:in block in <main>' 2018-04-11T13:54:32.386979+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in instance_eval'
2018-04-11T13:54:32.386997+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in initialize' 2018-04-11T13:54:32.387017+00:00 app[web.1]: from config.ru:in new'
2018-04-11T13:54:32.387036+00:00 app[web.1]: from config.ru:in <main>' 2018-04-11T13:54:32.387054+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in eval'
2018-04-11T13:54:32.387073+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in new_from_string' 2018-04-11T13:54:32.387091+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:40:in parse_file'
2018-04-11T13:54:32.387110+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:319:in build_app_and_options_from_config' 2018-04-11T13:54:32.387129+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:219:in app'
2018-04-11T13:54:32.387147+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in app' 2018-04-11T13:54:32.387166+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:354:in wrapped_app'
2018-04-11T13:54:32.387184+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:283:in start' 2018-04-11T13:54:32.387203+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:44:in start'
2018-04-11T13:54:32.387223+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in block in perform' 2018-04-11T13:54:32.387241+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in tap'
2018-04-11T13:54:32.387260+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in perform' 2018-04-11T13:54:32.387278+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
2018-04-11T13:54:32.387297+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' 2018-04-11T13:54:32.387315+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
2018-04-11T13:54:32.387334+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in perform' 2018-04-11T13:54:32.387352+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in invoke'
2018-04-11T13:54:32.387371+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in <top (required)>' 2018-04-11T13:54:32.387389+00:00 app[web.1]: from bin/rails:4:in require'
2018-04-11T13:54:32.387408+00:00 app[web.1]: from bin/rails:4:in <main>' 2018-04-11T13:54:32.398309+00:00 app[web.1]: => Booting Puma 2018-04-11T13:54:32.398312+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T13:54:32.398314+00:00 app[web.1]: => Run rails server -hfor more startup options 2018-04-11T13:54:32.398315+00:00 app[web.1]: Exiting 2018-04-11T13:54:32.699878+00:00 heroku[web.1]: State changed from starting to crashed 2018-04-11T13:55:27.572860+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=83882924-a800-4a88-bb6a-07110ba2adc4 fwd="203.104.146.156" dyno= connect= service= status=503 bytes= protocol=https 2018-04-11T14:01:05.564144+00:00 heroku[web.1]: State changed from crashed to starting 2018-04-11T14:01:08.517802+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 47120 -e production2018-04-11T14:01:12.237976+00:00 heroku[web.1]: State changed from starting to crashed 2018-04-11T14:01:12.129642+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:inrequire': /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}' (SyntaxError)
2018-04-11T14:01:12.129668+00:00 app[web.1]: ...9TLuznDrpFXPoDULfxwRRZpktu6fjek+j4KqAItPAjNspKY3l+8ppjMOrPbP...
2018-04-11T14:01:12.129669+00:00 app[web.1]: ... ^
2018-04-11T14:01:12.129671+00:00 app[web.1]: /app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}'
2018-04-11T14:01:12.129673+00:00 app[web.1]: ...bPEMLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyil

看更多先前的回應...收起先前的回應...

/app/app/controllers/pockybot_controller.rb:9: syntax error, unexpected tIDENTIFIER, expecting '}'

你看一下你的 pockybot_controller.rb 第 9 行 是不是多了一個 }

我的第九行長這樣
config.channel_token = SrPq5fJ8qiTvMhtw059s16SrTeK/fl/aaPL2+3qaSb5yE49M6VYCGH7OeBtWmEifOENW9TLuznDrpFXPoDULfxwRRZpktu6fjek+j4KqAItPAjNspKY3l+8ppjMOrPbPEMLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU=

你的金鑰要用 ' 包住頭尾

像這樣:

config.channel_token = 'SrPq5fJ8qiTvMhtw059s16SrTeK/fl/aaPL2+3qaSb5yE49M6VYCGH7OeBtWmEifOENW9TLuznDrpFXPoDULfxwRRZpktu6fjek+j4KqAItPAjNspKY3l+8ppjMOrPbPEMLyxGvQWMFKwBNm5kPzUAdB04t89/1O/w1cDnyilFU='

因為他是一個字串

改了 可是還是只會回預設的自動回復
D:\pockybot\ironman>heroku logs -t
2018-04-11T17:03:27.081919+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in block in run_initializers' 2018-04-11T17:03:27.081958+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each'
2018-04-11T17:03:27.082034+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from' 2018-04-11T17:03:27.082058+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component'
2018-04-11T17:03:27.082003+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' 2018-04-11T17:03:27.082084+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each'
2018-04-11T17:03:27.082109+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in call' 2018-04-11T17:03:27.082168+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component'
2018-04-11T17:03:27.082194+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' 2018-04-11T17:03:27.082218+00:00 app[web.1]: from /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/tsort.rb:205:in tsort_each'
2018-04-11T17:03:27.082242+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in run_initializers' 2018-04-11T17:03:27.082265+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/application.rb:353:in initialize!'
2018-04-11T17:03:27.082289+00:00 app[web.1]: from /app/config/environment.rb:5:in <top (required)>' 2018-04-11T17:03:27.082347+00:00 app[web.1]: from config.ru:3:in require_relative'
2018-04-11T17:03:27.082372+00:00 app[web.1]: from config.ru:3:in block in <main>' 2018-04-11T17:03:27.082402+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in instance_eval'
2018-04-11T17:03:27.082425+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in initialize' 2018-04-11T17:03:27.082451+00:00 app[web.1]: from config.ru:in new'
2018-04-11T17:03:27.082524+00:00 app[web.1]: from config.ru:in <main>' 2018-04-11T17:03:27.082550+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in eval'
2018-04-11T17:03:27.082575+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:49:in new_from_string' 2018-04-11T17:03:27.082600+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/builder.rb:40:in parse_file'
2018-04-11T17:03:27.082624+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:319:in build_app_and_options_from_config' 2018-04-11T17:03:27.082667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:219:in app'
2018-04-11T17:03:27.082751+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in app' 2018-04-11T17:03:27.082778+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:354:in wrapped_app'
2018-04-11T17:03:27.083066+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/server.rb:283:in start' 2018-04-11T17:03:27.083091+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:44:in start'
2018-04-11T17:03:27.083113+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in block in perform' 2018-04-11T17:03:27.083241+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in tap'
2018-04-11T17:03:27.083265+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in perform' 2018-04-11T17:03:27.083289+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
2018-04-11T17:03:27.083313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' 2018-04-11T17:03:27.083417+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
2018-04-11T17:03:27.083442+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in perform' 2018-04-11T17:03:27.083466+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in invoke'
2018-04-11T17:03:27.083592+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in <top (required)>' 2018-04-11T17:03:27.083618+00:00 app[web.1]: from bin/rails:4:in require'
2018-04-11T17:03:27.083641+00:00 app[web.1]: from bin/rails:4:in <main>' 2018-04-11T17:03:27.103494+00:00 app[web.1]: => Booting Puma 2018-04-11T17:03:27.103498+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T17:03:27.103500+00:00 app[web.1]: => Run rails server -hfor more startup options 2018-04-11T17:03:27.103502+00:00 app[web.1]: Exiting 2018-04-11T17:29:59.000000+00:00 app[api]: Build started by user kenneth87012@hotmail.com 2018-04-11T17:30:20.329024+00:00 heroku[web.1]: State changed from crashed to starting 2018-04-11T17:30:23.650917+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 26515 -e production2018-04-11T17:30:19.979799+00:00 app[api]: Release v18 created by user kenneth87012@hotmail.com 2018-04-11T17:29:59.000000+00:00 app[api]: Build succeeded 2018-04-11T17:30:19.979799+00:00 app[api]: Deploy b34f24f8 by user kenneth87012@hotmail.com 2018-04-11T17:30:27.922203+00:00 heroku[web.1]: State changed from starting to up 2018-04-11T17:30:27.807003+00:00 app[web.1]: => Booting Puma 2018-04-11T17:30:27.807023+00:00 app[web.1]: => Runrails server -hfor more startup options 2018-04-11T17:30:27.807021+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T17:30:27.807035+00:00 app[web.1]: * Min threads: 5, max threads: 5 2018-04-11T17:30:27.807033+00:00 app[web.1]: * Version 3.11.3 (ruby 2.3.7-p456), codename: Love Song 2018-04-11T17:30:27.807025+00:00 app[web.1]: Puma starting in single mode... 2018-04-11T17:30:27.807037+00:00 app[web.1]: * Environment: production 2018-04-11T17:30:27.807168+00:00 app[web.1]: * Listening on tcp://0.0.0.0:26515 2018-04-11T17:30:27.807621+00:00 app[web.1]: Use Ctrl-C to stop 2018-04-11T17:30:40.578519+00:00 heroku[router]: at=info method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=802c40d5-f7dd-4f35-905f-d2f8d70cde5d fwd="203.104.146.156" dyno=web.1 connect=2ms service=17ms status=200 bytes=289 protocol=https 2018-04-11T17:30:40.565562+00:00 app[web.1]: I, [2018-04-11T17:30:40.565447 #4] INFO -- : [802c40d5-f7dd-4f35-905f-d2f8d70cde5d] Started POST "/pockybot/webhook" for 203.104.146.156 at 2018-04-11 17:30:40 +0000 2018-04-11T17:30:40.569540+00:00 app[web.1]: I, [2018-04-11T17:30:40.569457 #4] INFO -- : [802c40d5-f7dd-4f35-905f-d2f8d70cde5d] Processing by PockybotController#webhook as */* 2018-04-11T17:30:40.569670+00:00 app[web.1]: I, [2018-04-11T17:30:40.569611 #4] INFO -- : [802c40d5-f7dd-4f35-905f-d2f8d70cde5d] Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"334908fcbaa1451fbbdf4846498dbbf8", "source"=>{"userId"=>"U12bf2235858139f93702942230eb5662", "type"=>"user"}, "timestamp"=>1523467839828, "message"=>{"type"=>"text", "id"=>"7778875324909", "text"=>"哈哈哈"}}], "pockybot"=>{"events"=>[{"type"=>"message", "replyToken"=>"334908fcbaa1451fbbdf4846498dbbf8", "source"=>{"userId"=>"U12bf2235858139f93702942230eb5662", "type"=>"user"}, "timestamp"=>1523467839828, "message"=>{"type"=>"text", "id"=>"7778875324909", "text"=>"哈哈哈"}}]}} 2018-04-11T17:30:40.576117+00:00 app[web.1]: W, [2018-04-11T17:30:40.576044 #4] WARN -- : [802c40d5-f7dd-4f35-905f-d2f8d70cde5d] Can't verify CSRF token authenticity. 2018-04-11T17:30:40.576509+00:00 app[web.1]: I, [2018-04-11T17:30:40.576446 #4] INFO -- : [802c40d5-f7dd-4f35-905f-d2f8d70cde5d] Completed 200 OK in 7ms 2018-04-11T17:31:37.000000+00:00 app[api]: Build started by user kenneth87012@hotmail.com 2018-04-11T17:31:37.000000+00:00 app[api]: Build succeeded 2018-04-11T17:31:59.772311+00:00 app[api]: Deploy 13fdbfe9 by user kenneth87012@hotmail.com 2018-04-11T17:31:59.772311+00:00 app[api]: Release v19 created by user kenneth87012@hotmail.com 2018-04-11T17:32:01.479329+00:00 heroku[web.1]: Restarting 2018-04-11T17:32:01.480784+00:00 heroku[web.1]: State changed from up to starting 2018-04-11T17:32:02.352171+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2018-04-11T17:32:02.365412+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish 2018-04-11T17:32:02.370291+00:00 app[web.1]: === puma shutdown: 2018-04-11 17:32:02 +0000 === 2018-04-11T17:32:02.370346+00:00 app[web.1]: - Goodbye! 2018-04-11T17:32:02.370504+00:00 app[web.1]: Exiting 2018-04-11T17:32:02.472061+00:00 heroku[web.1]: Process exited with status 143 2018-04-11T17:32:04.613994+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 26248 -e production2018-04-11T17:32:07.859158+00:00 app[web.1]: => Rails 5.1.6 application starting in production 2018-04-11T17:32:07.859134+00:00 app[web.1]: => Booting Puma 2018-04-11T17:32:07.859160+00:00 app[web.1]: => Runrails server -h` for more startup options
2018-04-11T17:32:07.859161+00:00 app[web.1]: Puma starting in single mode...
2018-04-11T17:32:07.859169+00:00 app[web.1]: * Version 3.11.3 (ruby 2.3.7-p456), codename: Love Song
2018-04-11T17:32:07.859170+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-04-11T17:32:07.859171+00:00 app[web.1]: * Environment: production
2018-04-11T17:32:07.859230+00:00 app[web.1]: * Listening on tcp://0.0.0.0:26248
2018-04-11T17:32:07.859599+00:00 app[web.1]: Use Ctrl-C to stop
2018-04-11T17:32:08.265086+00:00 heroku[web.1]: State changed from starting to up
2018-04-11T17:32:08.865601+00:00 app[web.1]: I, [2018-04-11T17:32:08.865464 #4] INFO -- : [2013918e-b54f-4ade-850a-19cd831efd01] Started POST "/pockybot/webhook" for 203.104.146.156 at 2018-04-11 17:32:08 +0000
2018-04-11T17:32:08.868839+00:00 app[web.1]: I, [2018-04-11T17:32:08.868762 #4] INFO -- : [2013918e-b54f-4ade-850a-19cd831efd01] Processing by PockybotController#webhook as /
2018-04-11T17:32:08.868955+00:00 app[web.1]: I, [2018-04-11T17:32:08.868892 #4] INFO -- : [2013918e-b54f-4ade-850a-19cd831efd01] Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"ecf4ca3dbef84a84b86b78700cf1117a", "source"=>{"userId"=>"U12bf2235858139f93702942230eb5662", "type"=>"user"}, "timestamp"=>1523467923129, "message"=>{"type"=>"text", "id"=>"7778878907157", "text"=>"哈哈哈"}}], "pockybot"=>{"events"=>[{"type"=>"message", "replyToken"=>"ecf4ca3dbef84a84b86b78700cf1117a", "source"=>{"userId"=>"U12bf2235858139f93702942230eb5662", "type"=>"user"}, "timestamp"=>1523467923129, "message"=>{"type"=>"text", "id"=>"7778878907157", "text"=>"哈哈哈"}}]}}
2018-04-11T17:32:08.875378+00:00 app[web.1]: W, [2018-04-11T17:32:08.875293 #4] WARN -- : [2013918e-b54f-4ade-850a-19cd831efd01] Can't verify CSRF token authenticity.
2018-04-11T17:32:08.875693+00:00 app[web.1]: I, [2018-04-11T17:32:08.875629 #4] INFO -- : [2013918e-b54f-4ade-850a-19cd831efd01] Completed 200 OK in 7ms
2018-04-11T17:32:08.878268+00:00 heroku[router]: at=info method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=2013918e-b54f-4ade-850a-19cd831efd01 fwd="203.104.146.156" dyno=web.1 connect=3ms service=18ms status=200 bytes=289 protocol=https
2018-04-11T17:33:00.109838+00:00 heroku[router]: at=info method=POST path="/pockybot/webhook" host=pockybot-cookie-beta-1.herokuapp.com request_id=5a6afadf-f599-4732-8c20-e355f8ae137f fwd="203.104.146.156" dyno=web.1 connect=1ms service=5ms status=200 bytes=289 protocol=https
2018-04-11T17:33:00.105745+00:00 app[web.1]: I, [2018-04-11T17:33:00.105646 #4] INFO -- : [5a6afadf-f599-4732-8c20-e355f8ae137f] Started POST "/pockybot/webhook" for 203.104.146.156 at 2018-04-11 17:33:00 +0000
2018-04-11T17:33:00.106953+00:00 app[web.1]: I, [2018-04-11T17:33:00.106851 #4] INFO -- : [5a6afadf-f599-4732-8c20-e355f8ae137f] Processing by PockybotController#webhook as /
2018-04-11T17:33:00.107637+00:00 app[web.1]: W, [2018-04-11T17:33:00.107550 #4] WARN -- : [5a6afadf-f599-4732-8c20-e355f8ae137f] Can't verify CSRF token authenticity.
2018-04-11T17:33:00.107116+00:00 app[web.1]: I, [2018-04-11T17:33:00.107029 #4] INFO -- : [5a6afadf-f599-4732-8c20-e355f8ae137f] Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"a1a16ad7c0f84b7fb4eacea43ed37b22", "source"=>{"userId"=>"U12bf2235858139f93702942230eb5662", "type"=>"user"}, "timestamp"=>1523467979404, "message"=>{"type"=>"text", "id"=>"7778881316077", "text"=>"哈哈哈"}}], "pockybot"=>{"events"=>[{"type"=>"message", "replyToken"=>"a1a16ad7c0f84b7fb4eacea43ed37b22", "source"=>{"userId"=>"U12bf2235858139f93702942230eb5662", "type"=>"user"}, "timestamp"=>1523467979404, "message"=>{"type"=>"text", "id"=>"7778881316077", "text"=>"哈哈哈"}}]}}
2018-04-11T17:33:00.107963+00:00 app[web.1]: I, [2018-04-11T17:33:00.107899 #4] INFO -- : [5a6afadf-f599-4732-8c20-e355f8ae137f] Completed 200 OK in 1ms

可以看一下現在的 code 嗎?

你的程式碼最下面有第二個

def webhook
...
end

這個會把上面那個蓋掉 所以就不回應
你應該要把這個多的刪掉

解決了 謝謝

/images/emoticon/emoticon12.gif

0
union9999
iT邦新手 5 級 ‧ 2018-05-23 09:48:30

卡卡米大,請問我是哪裡有出錯嗎? 回應都有200 OK ,機器人卻都沒有回應給我@@,麻煩您幫我核檢了><

D:\卡米狗\ironman>heroku logs -t
2018-05-23T00:26:20.500949+00:00 app[web.1]: - Goodbye!
2018-05-23T00:26:20.501138+00:00 app[web.1]: Exiting
2018-05-23T00:26:20.491475+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-05-23T00:26:20.631139+00:00 heroku[web.1]: Process exited with status 143
2018-05-23T00:26:19.284561+00:00 app[api]: Release v17 created by user union15379@gmail.com
2018-05-23T00:26:24.023605+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 16881 -e production`
2018-05-23T00:26:29.251967+00:00 app[web.1]: => Rails 5.2.0 application starting in production
2018-05-23T00:26:29.251932+00:00 app[web.1]: => Booting Puma
2018-05-23T00:26:29.251969+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-05-23T00:26:29.251970+00:00 app[web.1]: Puma starting in single mode...
2018-05-23T00:26:29.251978+00:00 app[web.1]: * Version 3.11.4 (ruby 2.4.4-p296), codename: Love Song
2018-05-23T00:26:29.251980+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-05-23T00:26:29.251981+00:00 app[web.1]: * Environment: production
2018-05-23T00:26:29.252062+00:00 app[web.1]: * Listening on tcp://0.0.0.0:16881
2018-05-23T00:26:29.252491+00:00 app[web.1]: Use Ctrl-C to stop
2018-05-23T00:26:29.846067+00:00 heroku[web.1]: State changed from starting to up
2018-05-23T00:26:47.910963+00:00 app[web.1]: I, [2018-05-23T00:26:47.910802 #4]  INFO -- : [202df549-f3a2-4a3e-986e-1ae39691b4b6] Started POST "/kamigo/webhook" for 203.104.146.156 at 2018-05-23 00:26:47 +0000
2018-05-23T00:26:47.923857+00:00 app[web.1]: I, [2018-05-23T00:26:47.923701 #4]  INFO -- : [202df549-f3a2-4a3e-986e-1ae39691b4b6] Processing by KamigoController#webhook as */*
2018-05-23T00:26:47.924058+00:00 app[web.1]: I, [2018-05-23T00:26:47.923951 #4]  INFO -- : [202df549-f3a2-4a3e-986e-1ae39691b4b6]   Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"8f6b94dce4064056888262772cc7239d", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527035207240, "message"=>{"type"=>"text", "id"=>"8001956538609", "text"=>"你好嗎"}}], "kamigo"=>{"events"=>[{"type"=>"message", "replyToken"=>"8f6b94dce4064056888262772cc7239d", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527035207240, "message"=>{"type"=>"text", "id"=>"8001956538609", "text"=>"你好嗎"}}]}}
2018-05-23T00:26:47.934934+00:00 app[web.1]: W, [2018-05-23T00:26:47.934816 #4]  WARN -- : [202df549-f3a2-4a3e-986e-1ae39691b4b6] Can't verify CSRF token authenticity.
2018-05-23T00:26:48.177970+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-anguswu.herokuapp.com request_id=202df549-f3a2-4a3e-986e-1ae39691b4b6 fwd="203.104.146.156" dyno=web.1 connect=0ms service=275ms status=200 bytes=408 protocol=https
2018-05-23T00:26:48.178339+00:00 app[web.1]: I, [2018-05-23T00:26:48.178185 #4]  INFO -- : [202df549-f3a2-4a3e-986e-1ae39691b4b6] Completed 200 OK in 254ms
2018-05-23T00:27:16.584420+00:00 app[web.1]: I, [2018-05-23T00:27:16.584281 #4]  INFO -- : [850a2ae8-5721-4cba-acea-d62a1cc3d2e2] Started POST "/kamigo/webhook" for 203.104.146.156 at 2018-05-23 00:27:16 +0000
2018-05-23T00:27:16.592154+00:00 app[web.1]: I, [2018-05-23T00:27:16.591841 #4]  INFO -- : [850a2ae8-5721-4cba-acea-d62a1cc3d2e2] Processing by KamigoController#webhook as */*
2018-05-23T00:27:16.592846+00:00 app[web.1]: I, [2018-05-23T00:27:16.592540 #4]  INFO -- : [850a2ae8-5721-4cba-acea-d62a1cc3d2e2]   Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"c643e18c5598414492f5592d543053e5", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527035236064, "message"=>{"type"=>"text", "id"=>"8001958041789", "text"=>"123"}}], "kamigo"=>{"events"=>[{"type"=>"message", "replyToken"=>"c643e18c5598414492f5592d543053e5", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527035236064, "message"=>{"type"=>"text", "id"=>"8001958041789", "text"=>"123"}}]}}
2018-05-23T00:27:16.597416+00:00 app[web.1]: W, [2018-05-23T00:27:16.597329 #4]  WARN -- : [850a2ae8-5721-4cba-acea-d62a1cc3d2e2] Can't verify CSRF token authenticity.
2018-05-23T00:27:16.851425+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-anguswu.herokuapp.com request_id=850a2ae8-5721-4cba-acea-d62a1cc3d2e2 fwd="203.104.146.156" dyno=web.1 connect=0ms service=277ms status=200 bytes=408 protocol=https
2018-05-23T00:27:16.847269+00:00 app[web.1]: I, [2018-05-23T00:27:16.847103 #4]  INFO -- : [850a2ae8-5721-4cba-acea-d62a1cc3d2e2] Completed 200 OK in 254ms
2018-05-23T00:27:31.845912+00:00 app[web.1]: I, [2018-05-23T00:27:31.845794 #4]  INFO -- : [167b8be5-1dfb-4073-b231-424457ee035f] Started POST "/kamigo/webhook" for 203.104.146.156 at 2018-05-23 00:27:31 +0000
2018-05-23T00:27:31.848208+00:00 app[web.1]: I, [2018-05-23T00:27:31.848134 #4]  INFO -- : [167b8be5-1dfb-4073-b231-424457ee035f] Processing by KamigoController#webhook as */*
2018-05-23T00:27:31.849183+00:00 app[web.1]: I, [2018-05-23T00:27:31.849111 #4]  INFO -- : [167b8be5-1dfb-4073-b231-424457ee035f]   Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"20b58c58e14b490eb50cb87617d9b33a", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527035251151, "message"=>{"type"=>"text", "id"=>"8001958824958", "text"=>"你好嗎"}}], "kamigo"=>{"events"=>[{"type"=>"message", "replyToken"=>"20b58c58e14b490eb50cb87617d9b33a", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527035251151, "message"=>{"type"=>"text", "id"=>"8001958824958", "text"=>"你好嗎"}}]}}
2018-05-23T00:27:31.849659+00:00 app[web.1]: W, [2018-05-23T00:27:31.849594 #4]  WARN -- : [167b8be5-1dfb-4073-b231-424457ee035f] Can't verify CSRF token authenticity.
2018-05-23T00:27:32.036967+00:00 app[web.1]: I, [2018-05-23T00:27:32.036782 #4]  INFO -- : [167b8be5-1dfb-4073-b231-424457ee035f] Completed 200 OK in 187ms
2018-05-23T00:27:32.036601+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-anguswu.herokuapp.com request_id=167b8be5-1dfb-4073-b231-424457ee035f fwd="203.104.146.156" dyno=web.1 connect=0ms service=194ms status=200 bytes=408 protocol=https
2018-05-23T00:29:18.891167+00:00 app[web.1]: I, [2018-05-23T00:29:18.891023 #4]  INFO -- : [49dd2f85-9483-48f5-8e77-56661fc29008] Started POST "/kamigo/webhook" for 203.104.146.156 at 2018-05-23 00:29:18 +0000
2018-05-23T00:29:18.893424+00:00 app[web.1]: I, [2018-05-23T00:29:18.893336 #4]  INFO -- : [49dd2f85-9483-48f5-8e77-56661fc29008]   Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"efda820b724a43fdafd9d7b07dfff00d", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527035358214, "message"=>{"type"=>"text", "id"=>"8001964401614", "text"=>"111"}}], "kamigo"=>{"events"=>[{"type"=>"message", "replyToken"=>"efda820b724a43fdafd9d7b07dfff00d", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527035358214, "message"=>{"type"=>"text", "id"=>"8001964401614", "text"=>"111"}}]}}
2018-05-23T00:29:18.893300+00:00 app[web.1]: I, [2018-05-23T00:29:18.893167 #4]  INFO -- : [49dd2f85-9483-48f5-8e77-56661fc29008] Processing by KamigoController#webhook as */*
2018-05-23T00:29:18.894069+00:00 app[web.1]: W, [2018-05-23T00:29:18.893953 #4]  WARN -- : [49dd2f85-9483-48f5-8e77-56661fc29008] Can't verify CSRF token authenticity.
2018-05-23T00:29:19.371069+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-anguswu.herokuapp.com request_id=49dd2f85-9483-48f5-8e77-56661fc29008 fwd="203.104.146.156" dyno=web.1 connect=1ms service=485ms status=200 bytes=408 protocol=https
2018-05-23T00:29:19.370144+00:00 app[web.1]: I, [2018-05-23T00:29:19.369966 #4]  INFO -- : [49dd2f85-9483-48f5-8e77-56661fc29008] Completed 200 OK in 476ms
2018-05-23T00:31:01.235493+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-anguswu.herokuapp.com request_id=0610659d-1902-447b-83af-c720d1b3311f fwd="203.104.156.75" dyno=web.1 connect=0ms service=212ms status=200 bytes=408 protocol=https
2018-05-23T00:31:01.024644+00:00 app[web.1]: I, [2018-05-23T00:31:01.024486 #4]  INFO -- : [0610659d-1902-447b-83af-c720d1b3311f] Started POST "/kamigo/webhook" for 203.104.156.75 at 2018-05-23 00:31:01 +0000
2018-05-23T00:31:01.028014+00:00 app[web.1]: I, [2018-05-23T00:31:01.027917 #4]  INFO -- : [0610659d-1902-447b-83af-c720d1b3311f] Processing by KamigoController#webhook as HTML
2018-05-23T00:31:01.028278+00:00 app[web.1]: I, [2018-05-23T00:31:01.028177 #4]  INFO -- : [0610659d-1902-447b-83af-c720d1b3311f]   Parameters: {"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1527035460386, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1527035460386, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}], "kamigo"=>{"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1527035460386, "source"=>{"type"=>"us
er", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1527035460386, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}]}}
2018-05-23T00:31:01.030331+00:00 app[web.1]: W, [2018-05-23T00:31:01.030228 #4]  WARN -- : [0610659d-1902-447b-83af-c720d1b3311f] Can't verify CSRF token authenticity.
2018-05-23T00:31:01.232840+00:00 app[web.1]: I, [2018-05-23T00:31:01.232667 #4]  INFO -- : [0610659d-1902-447b-83af-c720d1b3311f] Completed 200 OK in 204ms
2018-05-23T00:54:15.615994+00:00 heroku[router]: at=info method=GET path="/" host=people-all-love-anguswu.herokuapp.com request_id=b8b04a98-0779-486d-a3e6-e74b6d2eaf53 fwd="61.216.96.43" dyno=web.1 connect=0ms service=9ms status=404 bytes=1902 protocol=https
2018-05-23T00:54:15.615607+00:00 app[web.1]: I, [2018-05-23T00:54:15.615456 #4]  INFO -- : [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] Started GET "/" for 61.216.96.43 at 2018-05-23 00:54:15 +0000
2018-05-23T00:54:15.616357+00:00 app[web.1]: F, [2018-05-23T00:54:15.616276 #4] FATAL -- : [b8b04a98-0779-486d-a3e6-e74b6d2eaf53]
2018-05-23T00:54:15.616429+00:00 app[web.1]: F, [2018-05-23T00:54:15.616362 #4] FATAL -- : [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] ActionController::RoutingError (No route matches [GET] "/"):
2018-05-23T00:54:15.616494+00:00 app[web.1]: F, [2018-05-23T00:54:15.616431 #4] FATAL -- : [b8b04a98-0779-486d-a3e6-e74b6d2eaf53]
2018-05-23T00:54:15.616620+00:00 app[web.1]: F, [2018-05-23T00:54:15.616534 #4] FATAL -- : [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
2018-05-23T00:54:15.616624+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
2018-05-23T00:54:15.616626+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:38:in `call_app'
2018-05-23T00:54:15.616629+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:26:in `block in call'
2018-05-23T00:54:15.616631+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:71:in `block in tagged'
2018-05-23T00:54:15.616633+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:28:in `tagged'
2018-05-23T00:54:15.616635+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:71:in `tagged'
2018-05-23T00:54:15.616637+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:26:in `call'
2018-05-23T00:54:15.616638+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
2018-05-23T00:54:15.616640+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/request_id.rb:27:in `call'
2018-05-23T00:54:15.616642+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call'
2018-05-23T00:54:15.616643+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/runtime.rb:22:in `call'
2018-05-23T00:54:15.616646+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
2018-05-23T00:54:15.616648+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/executor.rb:14:in `call'
2018-05-23T00:54:15.616650+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/static.rb:127:in `call'
2018-05-23T00:54:15.616653+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/engine.rb:524:in `call'
2018-05-23T00:54:15.616652+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
2018-05-23T00:54:15.616655+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/configuration.rb:225:in `call'
2018-05-23T00:54:15.616656+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/server.rb:632:in `handle_request'
2018-05-23T00:54:15.616658+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/server.rb:446:in `process_client'
2018-05-23T00:54:15.616659+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/server.rb:306:in `block in run'
2018-05-23T00:54:15.616661+00:00 app[web.1]: [b8b04a98-0779-486d-a3e6-e74b6d2eaf53] vendor/bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
2018-05-23T00:54:15.863304+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=people-all-love-anguswu.herokuapp.com request_id=541acbe3-f6ab-4986-82b3-97b93cdeaa09 fwd="61.216.96.43" dyno=web.1 connect=0ms service=10ms status=200 bytes=143 protocol=https
2018-05-23T00:54:23.349866+00:00 app[web.1]: I, [2018-05-23T00:54:23.349733 #4]  INFO -- : [101924fa-b6eb-4440-899a-9cf32f78872d] Started GET "/kamigo/eat" for 61.216.96.43 at 2018-05-23 00:54:23 +0000
2018-05-23T00:54:23.357872+00:00 app[web.1]: I, [2018-05-23T00:54:23.357739 #4]  INFO -- : [101924fa-b6eb-4440-899a-9cf32f78872d] Processing by KamigoController#eat as HTML
2018-05-23T00:54:23.361854+00:00 app[web.1]: I, [2018-05-23T00:54:23.361756 #4]  INFO -- : [101924fa-b6eb-4440-899a-9cf32f78872d]   Rendering kamigo/eat.html within layouts/application
2018-05-23T00:54:23.362890+00:00 app[web.1]: I, [2018-05-23T00:54:23.362793 #4]  INFO -- : [101924fa-b6eb-4440-899a-9cf32f78872d]   Rendered kamigo/eat.html within layouts/application (0.8ms)
2018-05-23T00:54:23.365412+00:00 app[web.1]: I, [2018-05-23T00:54:23.365336 #4]  INFO -- : [101924fa-b6eb-4440-899a-9cf32f78872d] Completed 200 OK in 7ms (Views: 5.8ms)
2018-05-23T00:54:23.365689+00:00 heroku[router]: at=info method=GET path="/kamigo/eat" host=people-all-love-anguswu.herokuapp.com request_id=101924fa-b6eb-4440-899a-9cf32f78872d fwd="61.216.96.43" dyno=web.1 connect=0ms service=19ms status=200 bytes=1390 protocol=https
2018-05-23T00:54:23.585048+00:00 heroku[router]: at=info method=GET path="/assets/application-d58a1e597d4a41f8495f680dd3c9da8cdaeebf099001c73d8f2f1b31a9a0011f.js" host=people-all-love-anguswu.herokuapp.com request_id=da858d32-b272-4229-9744-43ba5c38e69e fwd="61.216.96.43" dyno=web.1 connect=0ms service=2ms status=200 bytes=19210 protocol=https
2018-05-23T00:54:23.582072+00:00 heroku[router]: at=info method=GET path="/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css" host=people-all-love-anguswu.herokuapp.com request_id=88ae046a-9da9-4d74-9a8c-45a96ac9ffe3 fwd="61.216.96.43" dyno=web.1 connect=0ms service=2ms status=200 bytes=195 protocol=https
2018-05-23T01:00:48.241255+00:00 app[web.1]: I, [2018-05-23T01:00:48.241113 #4]  INFO -- : [6d22ac24-15f0-4f35-98a7-6c3a6245d26f] Started POST "/kamigo/webhook" for 203.104.146.156 at 2018-05-23 01:00:48 +0000
2018-05-23T01:00:48.243095+00:00 app[web.1]: I, [2018-05-23T01:00:48.243000 #4]  INFO -- : [6d22ac24-15f0-4f35-98a7-6c3a6245d26f] Processing by KamigoController#webhook as */*
2018-05-23T01:00:48.243379+00:00 app[web.1]: I, [2018-05-23T01:00:48.243215 #4]  INFO -- : [6d22ac24-15f0-4f35-98a7-6c3a6245d26f]   Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"461b372255764f9d8271abffe7bf98a7", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527037247528, "message"=>{"type"=>"text", "id"=>"8002065560053", "text"=>"5566"}}], "kamigo"=>{"events"=>[{"type"=>"message", "replyToken"=>"461b372255764f9d8271abffe7bf98a7", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527037247528, "message"=>{"type"=>"text", "id"=>"8002065560053", "text"=>"5566"}}]}}
2018-05-23T01:00:48.244094+00:00 app[web.1]: W, [2018-05-23T01:00:48.244013 #4]  WARN -- : [6d22ac24-15f0-4f35-98a7-6c3a6245d26f] Can't verify CSRF token authenticity.
2018-05-23T01:00:48.504826+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-anguswu.herokuapp.com request_id=6d22ac24-15f0-4f35-98a7-6c3a6245d26f fwd="203.104.146.156" dyno=web.1 connect=1ms service=265ms status=200 bytes=408 protocol=https
2018-05-23T01:00:48.500825+00:00 app[web.1]: I, [2018-05-23T01:00:48.500645 #4]  INFO -- : [6d22ac24-15f0-4f35-98a7-6c3a6245d26f] Completed 200 OK in 257ms
2018-05-23T01:10:13.120875+00:00 app[web.1]: I, [2018-05-23T01:10:13.120733 #4]  INFO -- : [b3b0659e-500e-47f5-ad1e-06b78347e5e5] Started POST "/kamigo/webhook" for 203.104.156.74 at 2018-05-23 01:10:13 +0000
2018-05-23T01:10:13.128496+00:00 app[web.1]: I, [2018-05-23T01:10:13.128389 #4]  INFO -- : [b3b0659e-500e-47f5-ad1e-06b78347e5e5] Processing by KamigoController#webhook as HTML
2018-05-23T01:10:13.129214+00:00 app[web.1]: I, [2018-05-23T01:10:13.129101 #4]  INFO -- : [b3b0659e-500e-47f5-ad1e-06b78347e5e5]   Parameters: {"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1527037812457, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1527037812457, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}], "kamigo"=>{"events"=>[{"replyToken"=>"00000000000000000000000000000000", "type"=>"message", "timestamp"=>1527037812457, "source"=>{"type"=>"us
er", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100001", "type"=>"text", "text"=>"Hello, world"}}, {"replyToken"=>"ffffffffffffffffffffffffffffffff", "type"=>"message", "timestamp"=>1527037812457, "source"=>{"type"=>"user", "userId"=>"Udeadbeefdeadbeefdeadbeefdeadbeef"}, "message"=>{"id"=>"100002", "type"=>"sticker", "packageId"=>"1", "stickerId"=>"1"}}]}}
2018-05-23T01:10:13.133181+00:00 app[web.1]: W, [2018-05-23T01:10:13.133086 #4]  WARN -- : [b3b0659e-500e-47f5-ad1e-06b78347e5e5] Can't verify CSRF token authenticity.
2018-05-23T01:10:13.343063+00:00 app[web.1]: I, [2018-05-23T01:10:13.342897 #4]  INFO -- : [b3b0659e-500e-47f5-ad1e-06b78347e5e5] Completed 200 OK in 213ms
2018-05-23T01:10:13.376567+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-anguswu.herokuapp.com request_id=b3b0659e-500e-47f5-ad1e-06b78347e5e5 fwd="203.104.156.74" dyno=web.1 connect=0ms service=259ms status=200 bytes=408 protocol=https
2018-05-23T01:11:30.564189+00:00 app[web.1]: I, [2018-05-23T01:11:30.564059 #4]  INFO -- : [3d91a756-2dd7-49ac-a8d4-a9ff0993b5d8] Started POST "/kamigo/webhook" for 203.104.146.156 at 2018-05-23 01:11:30 +0000
2018-05-23T01:11:30.566894+00:00 app[web.1]: I, [2018-05-23T01:11:30.566774 #4]  INFO -- : [3d91a756-2dd7-49ac-a8d4-a9ff0993b5d8] Processing by KamigoController#webhook as */*
2018-05-23T01:11:30.567161+00:00 app[web.1]: I, [2018-05-23T01:11:30.567077 #4]  INFO -- : [3d91a756-2dd7-49ac-a8d4-a9ff0993b5d8]   Parameters: {"events"=>[{"type"=>"message", "replyToken"=>"3bf39b43d02045469c84777fba434810", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527037889854, "message"=>{"type"=>"text", "id"=>"8002101395811", "text"=>"123"}}], "kamigo"=>{"events"=>[{"type"=>"message", "replyToken"=>"3bf39b43d02045469c84777fba434810", "source"=>{"userId"=>"U609f53612625fada326dbf5c71e94ba9", "type"=>"user"}, "timestamp"=>1527037889854, "message"=>{"type"=>"text", "id"=>"8002101395811", "text"=>"123"}}]}}
2018-05-23T01:11:30.570914+00:00 app[web.1]: W, [2018-05-23T01:11:30.570276 #4]  WARN -- : [3d91a756-2dd7-49ac-a8d4-a9ff0993b5d8] Can't verify CSRF token authenticity.
2018-05-23T01:11:31.070056+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-anguswu.herokuapp.com request_id=3d91a756-2dd7-49ac-a8d4-a9ff0993b5d8 fwd="203.104.146.156" dyno=web.1 connect=1ms service=513ms status=200 bytes=408 protocol=https
2018-05-23T01:11:31.068420+00:00 app[web.1]: I, [2018-05-23T01:11:31.068265 #4]  INFO -- : [3d91a756-2dd7-49ac-a8d4-a9ff0993b5d8] Completed 200 OK in 501ms

你的 code 裡面是不是有兩個

def webhook
  ...
end

如果有 刪掉多的那個

union9999 iT邦新手 5 級 ‧ 2018-05-23 12:35:57 檢舉

卡卡米大 我的code 是這樣子

https://ithelp.ithome.com.tw/upload/images/20180523/20061531LoHGrDGwAZ.jpg

這樣看不出來為何失敗,建議在 response = client.reply_message.... 的下一行加入以下程式碼:

p '========='
p response
p response.body
p '========='

再重新測一次,並且觀察 logs 的內容

0
vip131430
iT邦新手 5 級 ‧ 2018-06-04 15:56:18

請問:
Line Bot 回覆訊息功能,已經驗證過後台 Webhook 是正常的,
但是我的機器人都無法回覆訊息,在 log 看到的資訊如下圖
我在 reposnse 加上 回傳詳細資訊
<Net::HTTPForbidden 403 Forbidden readbody=true> 顯示此訊息
是 heroku 設定有問題嗎 ?
https://ithelp.ithome.com.tw/upload/images/20180604/20110184vuq6YrY0DE.jpg

看更多先前的回應...收起先前的回應...

你的截圖並不是用傳訊息的方式產生的 而是用後台驗證的對吧? 這樣無法看出你的問題

vip131430 iT邦新手 5 級 ‧ 2018-06-07 10:01:30 檢舉

卡米大您好,不好意思截圖沒有很完整,以下是我這兩天測試結果,還是無法在 heroku 上面執行 但是回傳的 status code 都是 200

  1. 下面兩張圖 是我輸入學說話指令的 log 資料庫都有正常新增
    https://ithelp.ithome.com.tw/upload/images/20180607/20110184LjxiOvwuDS.jpg
    https://ithelp.ithome.com.tw/upload/images/20180607/20110184GlcNRmQl8R.jpg

後台新增的學說話記錄
https://ithelp.ithome.com.tw/upload/images/20180607/20110184vrVJVZs3fY.jpg

我在 line聊天視窗 輸入 今天星期幾的 log 回覆
response 還是會顯示 <Net::HTTPForbidden 403 Forbidden readbody=true>
https://ithelp.ithome.com.tw/upload/images/20180607/20110184WKGHdPCz7a.jpg

請教到底是哪裡出了問題 google了很久 還是找不到原因
我另外用了 PHP 去改寫 在 heroku 都還是會有 403的問題

vip131430 iT邦新手 5 級 ‧ 2018-06-07 10:05:57 檢舉

下圖為我加上
p '========='
p response
p response.body
p '========='
這是 IP 問題嗎 ? 改如何設定呢
https://ithelp.ithome.com.tw/upload/images/20180607/201101849tiYsnnytw.jpg

其實他有講原因了,就是 Access to this API denied due to the following reason: Your ip address [184.73.22.37] is not allowed to access this API. Please add your IP to the IP whitelist in the developer center.

一般帳號沒有做任何 IP 白名單設定的話應該不會遇到這個問題才對壓 你為什麼會遇到?

vip131430 iT邦新手 5 級 ‧ 2018-06-08 09:24:23 檢舉

我也不清楚耶...按照卡米大的方式去申請 heroku 我有上網查白名單設定 需要綁定信用卡才能 但是我連信用卡都沒綁訂 不知道改怎麼處理它...

你的白名單設定是在 line developer 後台設定的,這跟 heroku 無關,你可以到 line 後台把設定關掉

vip131430 iT邦新手 5 級 ‧ 2018-06-08 16:36:34 檢舉

我找到了,訊息會回覆了,line@ 很久之前有串過一次,忘記有設定 IP了...謝謝卡米大大指導

0
ke0914
iT邦新手 5 級 ‧ 2018-07-06 18:46:08

https://ithelp.ithome.com.tw/upload/images/20180706/20110562wR9YvNEIO8.png
請問一下這個檔案要怎麼弄出來?
我不是很了解您的意思
可以細講嗎?

看更多先前的回應...收起先前的回應...

把在小黑框裡面的文字複製出來

新增一個文字檔案,貼上,儲存檔案

ke0914 iT邦新手 5 級 ‧ 2018-07-08 00:49:12 檢舉

之後我有看懂了
覺得問了一個很白癡的問題 哈哈
謝謝~

ke0914 iT邦新手 5 級 ‧ 2018-07-08 00:49:20 檢舉

之後我有看懂了
覺得問了一個很白癡的問題 哈哈
謝謝~

/images/emoticon/emoticon12.gif

/images/emoticon/emoticon12.gif

/images/emoticon/emoticon12.gif

/images/emoticon/emoticon12.gif

/images/emoticon/emoticon12.gif

0
frank_huang
iT邦新手 5 級 ‧ 2018-08-27 14:39:57

請問:
我無法從 heroku logs -t 獲得post參數訊息
我該如何修復他?!

▸ heroku-cli: update available from 6.16.4 to 6.99.0-ec9edad
2018-08-24T08:00:45.431035+00:00 heroku[web.1]: Idling
2018-08-24T08:00:45.431591+00:00 heroku[web.1]: State changed from up to down
2018-08-24T08:00:46.657553+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-08-24T08:00:46.678545+00:00 app[web.1]: [2018-08-24 08:00:46] FATAL SignalException: SIGTERM
2018-08-24T08:00:46.678559+00:00 app[web.1]: /app/vendor/ruby-2.4.4/lib/ruby/2.4.0/webrick/server.rb:171:in select' 2018-08-24T08:00:46.678563+00:00 app[web.1]: /app/vendor/ruby-2.4.4/lib/ruby/2.4.0/webrick/server.rb:171:in block in start'
2018-08-24T08:00:46.678566+00:00 app[web.1]: /app/vendor/ruby-2.4.4/lib/ruby/2.4.0/webrick/server.rb:158:in start' 2018-08-24T08:00:46.678570+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-1.6.10/lib/rack/server.rb:287:in start'
2018-08-24T08:00:46.678565+00:00 app[web.1]: /app/vendor/ruby-2.4.4/lib/ruby/2.4.0/webrick/server.rb:33:in start' 2018-08-24T08:00:46.678572+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bundler/gems/rails-3804d017333d/railties/lib/rails/commands/server.rb:80:in start'
2018-08-24T08:00:46.678568+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-1.6.10/lib/rack/handler/webrick.rb:34:in run' 2018-08-24T08:00:46.678578+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bundler/gems/rails-3804d017333d/railties/lib/rails/commands/commands_tasks.rb:75:in server'
2018-08-24T08:00:46.678575+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bundler/gems/rails-3804d017333d/railties/lib/rails/commands/commands_tasks.rb:80:in block in server' 2018-08-24T08:00:46.678577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bundler/gems/rails-3804d017333d/railties/lib/rails/commands/commands_tasks.rb:75:in tap'
2018-08-24T08:00:46.678584+00:00 app[web.1]: bin/rails:9:in require' 2018-08-24T08:00:46.678819+00:00 app[web.1]: [2018-08-24 08:00:46] INFO going to shutdown ... 2018-08-24T08:00:46.678905+00:00 app[web.1]: [2018-08-24 08:00:46] INFO WEBrick::HTTPServer#start done. 2018-08-24T08:00:46.687602+00:00 app[web.1]: => Run rails server -hfor more startup options 2018-08-24T08:00:46.678580+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bundler/gems/rails-3804d017333d/railties/lib/rails/commands/commands_tasks.rb:39:inrun_command!'
2018-08-24T08:00:46.678582+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bundler/gems/rails-3804d017333d/railties/lib/rails/commands.rb:17:in <top (required)>' 2018-08-24T08:00:46.687600+00:00 app[web.1]: => Rails 4.2.10 application starting in production on http://0.0.0.0:46169 2018-08-24T08:00:46.678586+00:00 app[web.1]: bin/rails:9:in '
2018-08-24T08:00:46.687595+00:00 app[web.1]: => Booting WEBrick
2018-08-24T08:00:46.687603+00:00 app[web.1]: => Ctrl-C to shutdown server
2018-08-24T08:00:46.687608+00:00 app[web.1]: Exiting
2018-08-24T08:00:46.769664+00:00 heroku[web.1]: Process exited with status 143
2018-08-27T03:57:06.000000+00:00 app[api]: Build started by user franksmhuang@gmail.com
2018-08-27T03:57:30.441829+00:00 heroku[web.1]: State changed from down to starting
2018-08-27T03:57:33.044052+00:00 heroku[web.1]: Starting process with command bin/rails server -p 17926 -e production
2018-08-27T03:57:29.730758+00:00 app[api]: Deploy 719c0c5d by user franksmhuang@gmail.com
2018-08-27T03:57:29.730758+00:00 app[api]: Release v14 created by user franksmhuang@gmail.com
2018-08-27T03:57:33.000000+00:00 app[api]: Build succeeded
2018-08-27T03:57:36.335993+00:00 app[web.1]: [2018-08-27 03:57:36] INFO WEBrick 1.3.1
2018-08-27T03:57:36.336025+00:00 app[web.1]: [2018-08-27 03:57:36] INFO ruby 2.4.4 (2018-03-28) [x86_64-linux]
2018-08-27T03:57:36.336373+00:00 app[web.1]: [2018-08-27 03:57:36] INFO WEBrick::HTTPServer#start: pid=4 port=17926
2018-08-27T03:57:36.876562+00:00 heroku[web.1]: State changed from starting to up
2018-08-27T03:58:48.363609+00:00 heroku[router]: at=info method=GET path="/" host=people-all-love-kamigo-frank.herokuapp.com request_id=5e496d20-f910-4761-9370-5f8adfb20255 fwd="211.21.129.61" dyno=web.1 connect=1ms service=122ms status=404 bytes=1829 protocol=https
2018-08-27T03:58:48.248195+00:00 app[web.1]: The PGconn, PGresult, and PGError constants are deprecated, and will be
2018-08-27T03:58:48.248231+00:00 app[web.1]: removed as of version 1.0.
2018-08-27T03:58:48.248232+00:00 app[web.1]:
2018-08-27T03:58:48.248234+00:00 app[web.1]: You should use PG::Connection, PG::Result, and PG::Error instead, respectively.
2018-08-27T03:58:48.248235+00:00 app[web.1]:
2018-08-27T03:58:48.248237+00:00 app[web.1]: Called from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in load_dependency' 2018-08-27T03:58:48.845965+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=people-all-love-kamigo-frank.herokuapp.com request_id=90ad2fa6-e88d-4bb9-88f5-dd36a7b73602 fwd="211.21.129.61" dyno=web.1 connect=1ms service=4ms status=200 bytes=228 protocol=https 2018-08-27T03:58:50.819537+00:00 heroku[router]: at=info method=GET path="/kamigo/eat" host=people-all-love-kamigo-frank.herokuapp.com request_id=c53b00f8-1042-493b-975e-a6d47ce24a95 fwd="211.21.129.61" dyno=web.1 connect=1ms service=15ms status=304 bytes=397 protocol=https 2018-08-27T03:58:56.427155+00:00 heroku[router]: at=info method=GET path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=57736f55-47aa-4b34-9f3b-222968b834c9 fwd="211.21.129.61" dyno=web.1 connect=1ms service=6ms status=404 bytes=1829 protocol=https 2018-08-27T03:59:06.519033+00:00 heroku[router]: at=info method=GET path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=71af6a1c-4a10-4371-bde4-608ea4cc4f31 fwd="211.21.129.61" dyno=web.1 connect=1ms service=6ms status=404 bytes=1829 protocol=https 2018-08-27T03:59:06.896254+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=people-all-love-kamigo-frank.herokuapp.com request_id=5adbe361-7348-401f-9a63-2742bca81ad7 fwd="211.21.129.61" dyno=web.1 connect=1ms service=3ms status=304 bytes=133 protocol=https 2018-08-27T03:59:11.121017+00:00 heroku[router]: at=info method=GET path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=8a58f365-e309-4241-855a-85fd62c0989c fwd="211.21.129.61" dyno=web.1 connect=1ms service=5ms status=404 bytes=1829 protocol=https 2018-08-27T03:59:21.568745+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=fb267c45-a457-419c-8de4-703f13703e6f fwd="211.21.129.61" dyno=web.1 connect=1ms service=7ms status=200 bytes=360 protocol=https 2018-08-27T04:00:11.649713+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=ff96794e-cf36-4013-a437-c594f8bb6a35 fwd="203.104.156.74" dyno=web.1 connect=0ms service=6ms status=200 bytes=360 protocol=https 2018-08-27T04:04:32.508053+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=e59bb286-24a1-4ecb-bb9a-85e6ce7b2f90 fwd="203.104.156.74" dyno=web.1 connect=1ms service=9ms status=200 bytes=360 protocol=https 2018-08-27T04:37:41.629544+00:00 heroku[web.1]: Idling 2018-08-27T04:37:41.629998+00:00 heroku[web.1]: State changed from up to down 2018-08-27T04:37:42.134031+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2018-08-27T04:37:42.142316+00:00 app[web.1]: [2018-08-27 04:37:42] FATAL SignalException: SIGTERM 2018-08-27T04:37:42.142337+00:00 app[web.1]: /app/vendor/ruby-2.4.4/lib/ruby/2.4.0/webrick/server.rb:171:in select'
2018-08-27T04:37:42.142340+00:00 app[web.1]: /app/vendor/ruby-2.4.4/lib/ruby/2.4.0/webrick/server.rb:171:in block in start' 2018-08-27T04:37:42.142342+00:00 app[web.1]: /app/vendor/ruby-2.4.4/lib/ruby/2.4.0/webrick/server.rb:33:in start'
2018-08-27T04:37:42.142344+00:00 app[web.1]: /app/vendor/ruby-2.4.4/lib/ruby/2.4.0/webrick/server.rb:158:in start' 2018-08-27T04:37:42.142348+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-1.6.10/lib/rack/handler/webrick.rb:34:in run'
2018-08-27T04:37:42.142350+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-1.6.10/lib/rack/server.rb:287:in start' 2018-08-27T04:37:42.142352+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.10/lib/rails/commands/server.rb:80:in start'
2018-08-27T04:37:42.142355+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:80:in block in server' 2018-08-27T04:37:42.142362+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in tap'
2018-08-27T04:37:42.142363+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in server' 2018-08-27T04:37:42.142365+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in run_command!'
2018-08-27T04:37:42.142366+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in <top (required)>' 2018-08-27T04:37:42.142368+00:00 app[web.1]: bin/rails:9:in require'
2018-08-27T04:37:42.142369+00:00 app[web.1]: bin/rails:9:in <main>' 2018-08-27T04:37:42.142428+00:00 app[web.1]: [2018-08-27 04:37:42] INFO going to shutdown ... 2018-08-27T04:37:42.142500+00:00 app[web.1]: [2018-08-27 04:37:42] INFO WEBrick::HTTPServer#start done. 2018-08-27T04:37:42.151079+00:00 app[web.1]: => Booting WEBrick 2018-08-27T04:37:42.151083+00:00 app[web.1]: => Rails 4.2.10 application starting in production on http://0.0.0.0:17926 2018-08-27T04:37:42.151084+00:00 app[web.1]: => Run rails server -hfor more startup options 2018-08-27T04:37:42.151086+00:00 app[web.1]: => Ctrl-C to shutdown server 2018-08-27T04:37:42.151091+00:00 app[web.1]: Exiting 2018-08-27T04:37:42.214935+00:00 heroku[web.1]: Process exited with status 143 2018-08-27T05:37:56.434794+00:00 heroku[web.1]: Unidling 2018-08-27T05:37:56.435113+00:00 heroku[web.1]: State changed from down to starting 2018-08-27T05:38:00.846896+00:00 heroku[web.1]: Starting process with commandbin/rails server -p 29526 -e production2018-08-27T05:38:06.281856+00:00 app[web.1]: [2018-08-27 05:38:06] INFO WEBrick 1.3.1 2018-08-27T05:38:06.281877+00:00 app[web.1]: [2018-08-27 05:38:06] INFO ruby 2.4.4 (2018-03-28) [x86_64-linux] 2018-08-27T05:38:06.282329+00:00 app[web.1]: [2018-08-27 05:38:06] INFO WEBrick::HTTPServer#start: pid=4 port=29526 2018-08-27T05:38:06.776794+00:00 heroku[web.1]: State changed from starting to up 2018-08-27T05:38:08.496908+00:00 app[web.1]: The PGconn, PGresult, and PGError constants are deprecated, and will be 2018-08-27T05:38:08.496956+00:00 app[web.1]: removed as of version 1.0. 2018-08-27T05:38:08.496958+00:00 app[web.1]: 2018-08-27T05:38:08.496960+00:00 app[web.1]: You should use PG::Connection, PG::Result, and PG::Error instead, respectively. 2018-08-27T05:38:08.496962+00:00 app[web.1]: 2018-08-27T05:38:08.496964+00:00 app[web.1]: Called from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:inload_dependency'
2018-08-27T05:38:09.585911+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=95349b69-a4f8-4104-9dc4-9ed58f636830 fwd="203.104.156.75" dyno=web.1 connect=0ms service=1096ms status=200 bytes=360 protocol=https
2018-08-27T05:38:14.317245+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=1c38b1f4-51b9-47df-83ad-7429a42e8f47 fwd="203.104.156.76" dyno=web.1 connect=0ms service=15ms status=200 bytes=360 protocol=https
2018-08-27T05:45:23.012647+00:00 heroku[run.6974]: Awaiting client
2018-08-27T05:45:23.075680+00:00 heroku[run.6974]: State changed from starting to up
2018-08-27T05:45:19.268299+00:00 app[api]: Starting process with command rails c by user franksmhuang@gmail.com
2018-08-27T05:45:53.037119+00:00 heroku[run.6974]: State changed from up to complete
2018-08-27T05:45:53.014462+00:00 heroku[run.6974]: Error R13 (Attach error) -> Failed to attach to process
2018-08-27T05:45:53.019682+00:00 heroku[run.6974]: Process exited with status 128
2018-08-27T05:52:36.991158+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=06a032fd-2cfb-4d1c-bc61-0dee9e823e3b fwd="203.104.156.76" dyno=web.1 connect=1ms service=15ms status=200 bytes=360 protocol=https
2018-08-27T06:23:36.911993+00:00 heroku[router]: at=info method=GET path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=e875f310-6a7c-404a-bc2b-c9e91906ec87 fwd="211.21.129.61" dyno=web.1 connect=0ms service=14ms status=404 bytes=1829 protocol=https
2018-08-27T06:23:37.420782+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=people-all-love-kamigo-frank.herokuapp.com request_id=b2dafc2a-c0a7-4a59-9802-95b4430a7ddf fwd="211.21.129.61" dyno=web.1 connect=0ms service=9ms status=304 bytes=133 protocol=https
2018-08-27T06:24:22.836602+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=4b352a22-31ee-4152-b4eb-7cf7e7015b2e fwd="203.104.146.156" dyno=web.1 connect=0ms service=17ms status=200 bytes=360 protocol=https
2018-08-27T06:24:29.333082+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=6abe26ff-e60d-475a-8755-afbdb34c156f fwd="203.104.146.156" dyno=web.1 connect=1ms service=18ms status=200 bytes=360 protocol=https
2018-08-27T06:24:37.927088+00:00 heroku[router]: at=info method=POST path="/kamigo/webhook" host=people-all-love-kamigo-frank.herokuapp.com request_id=b258e373-1c9c-4466-bb36-a278f12a12d5 fwd="203.104.146.156" dyno=web.1 connect=1ms service=18ms status=200 bytes=360 protocol=https

0
Alan
iT邦新手 5 級 ‧ 2018-09-08 14:22:46

郭大,我出現這兩個問題,可以幫幫我嗎?


看更多先前的回應...收起先前的回應...

線索太少
只能看出是資料庫相關的問題

Alan iT邦新手 5 級 ‧ 2018-09-08 21:04:17 檢舉

郭大,那請問我該從哪邊操作,該附上什麼資料給您呢^^
我快發瘋了,我好想趕快做出來,剛剛還去博客來買郭大的書呢

需要看一下 Gemfile 跟 config/database.yml 這兩個檔

Alan iT邦新手 5 級 ‧ 2018-09-10 09:23:27 檢舉

好的,下班後提供給您哦~

0
韓寶寶
iT邦新手 5 級 ‧ 2018-10-28 15:01:15

作者您好。
我是完全新手,跟著您的教學來到21天,但我測試之後發現我的機器人不會回應。


輸入關鍵字的話,仍然會因為之前的系統設定而回覆,但不會回覆設定在程式內的文字。
是因為我這個機器人已經設定了許多關鍵字的關係嗎?

並且爬了回應之後,有設定抓問題的內碼。

可是我的小黑窗並沒有出現類似的訊息。

訊息就這麼多,後面就沒有了。

想請問是不是我有那裡漏掉了什麼步驟嗎?

另,第19天的時候,我有出現錯誤#56,有爬過回應之後重新設定,所以沒有再跳錯誤訊息。
不過卡在第21天了……

剛爬了一下回應,似乎還要附上其他檔案比較好判斷。

這邊順便一起放上了。
Gemfile


config/database.yml

不知道postman畫面是否要附上,所以還是放一下好了。
我畫面並沒有出現錯誤訊息。

這裡你要注意的東西有兩個部分:

  • 第一個部分是呼叫方,也就是 line 或者 postman。
  • 第二個部分是接收方,也就是我們的網站,但是網站有兩個環境,一個是開發環境,也就是你的電腦,另一個是正式環境,也就是 heroku。

當你發現開發環境的行為跟正式環境的行為不一致時,你應該檢查這兩個項目:

  • 當你在 postman 傳遞訊息給你的開發環境時,你傳遞的內容是否跟 line 傳遞給 heroku 的內容一致。
  • 確保你的正式環境程式碼是否與開發環境相同。

在這裡比較明顯的錯誤是你的 postman 發送的 http method 應該選用 POST 而不是 GET。

不確定有無其他問題。

韓寶寶 iT邦新手 5 級 ‧ 2018-10-28 22:26:39 檢舉

感謝作者回覆。
但我看得有點霧煞煞。

不過我從頭又做了另外一個資料夾。
本來在KAMIGO下執行。
現在在另一個我自開的資料夾修正。
並在每一個跟KAMIGO有關的字樣都換成了資料夾。
這樣是否會影響後續的教學操作?(開網頁是都正常的狀態)

另外剛好重新來到了第16天,有個函數設定愛老虎油的地方,位置是都將函數放置在此處嗎?
https://ithelp.ithome.com.tw/upload/images/20181028/20112938qYARWZ296l.png

改名字應該是不影響

函數(def)的順序不會影響結果

0
a0224226261
iT邦新手 5 級 ‧ 2018-11-30 21:35:09

作者您好我不知道錯在哪跪求執導
https://ithelp.ithome.com.tw/upload/images/20181130/20113708GN20nBP0lj.png

我看不出你遇到什麼問題

0
a0224226261
iT邦新手 5 級 ‧ 2018-11-30 22:55:30

卡在一個奇怪的地方希望指教
https://ithelp.ithome.com.tw/upload/images/20181130/20113708FD4jNhIzwj.jpg

字太糊了

0
charlie1219
iT邦見習生 ‧ 2018-12-04 01:25:02

這個是logs
https://imgur.com/a/ddPtMXs

controller.rb
https://imgur.com/a/4xfL4CP

求助大大
沒辦法回覆 好哦~好哦~

0
charlie1219
iT邦見習生 ‧ 2018-12-04 01:25:07

這個是logs
https://imgur.com/a/ddPtMXs

controller.rb
https://imgur.com/a/4xfL4CP

求助大大
沒辦法回覆 好哦~好哦~

你有把 code 上傳到 heroku 嗎

0
XGungo
iT邦新手 5 級 ‧ 2019-04-25 16:20:08

剛剛發現 webhook 呼叫controller 裡的函數不能叫做 webhook (def webhook)
不然不能回覆

ruby version:2.5.3

0
jian_wei
iT邦新手 5 級 ‧ 2019-05-26 13:43:19

郭大你好
我把成程式碼佈署上去後LINE還是沒有反應 查看LOGS 他說
ArgumentError (header field value cannot include CR/LF)
可我不清楚是在哪邊 附上我的程式碼!!https://ithelp.ithome.com.tw/upload/images/20190526/20115672rn5qWl9qds.png
https://ithelp.ithome.com.tw/upload/images/20190526/20115672dPa4Kx1jqs.png
https://ithelp.ithome.com.tw/upload/images/20190526/20115672wrz4OAEC7N.png

0
Ken(Bigcandy)
iT邦大師 1 級 ‧ 2021-02-10 21:20:14

對我來說好深奧..........

我要留言

立即登入留言