繁体   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