簡體   English   中英

碼頭機器人

[英]Hubot in Terminal

我在運行OS X Yosemite版本10.10.3的MacBook Pro上,正在用TextMate版本2.0-beta.7.4編寫代碼,所有heroku和hubot都是最新版本。

在一堂課中,我們必須將Hubot安裝到我們的計算機上,以便在終端中對代碼進行本地測試。 一旦該代碼正常,我們就將其推送到Heroku並使用另一個機器人對其進行測試。 然后,如果對那個bot沒問題,老師會推到git,然后我們就可以輕松地使用Hubot來顯示我們編寫的代碼。

我的問題是,我的終端無法顯示我編寫的代碼。 我該怎么做才能解決此問題,以便繼續進行下一步? 我所做的就是編寫代碼,但它從未在終端中顯示出來。

當我嘗試推到Heroku之前,我猜到了這個錯誤。

2015-06-26T16:56:00.521845+00:00 app[web.1]: [Fri Jun 26 2015 12:56:00 GMT-0400 (EDT)] ERROR Unable to load /app/scripts/thisclass: /app/scripts/thisclass.js:1

這些文件的代碼以JavaScript結尾,所以.js

這是thisclass.js

// Description:
//   Explaining the class, program, and school.
//
// Dependencies:
//   None
//
// Configuration:
//   None
//
// Commands:
//   hubot dwp class - Explaining the class, program, and school.
//
// Author: 
//   Emily Van Vlerah
//
// Contributor:
//   None

module.exports = function(robot){
    // User types in command
    return robot.respond(/dwp class/i,function(msg){
        //The class information
        msg.send("This is the Deployment of Web Applications for the Web Design and Development program at Full Sail University.");
    });
}

我的其他文件與將顯示的信息相同。

在您粘貼的代碼中,您缺少; 在最后

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM