简体   繁体   English

码头机器人

[英]Hubot in Terminal

I'm on a MacBook Pro running OS X Yosemite Version 10.10.3, I'm writing my code in TextMate version 2.0-beta.7.4, and all of the heroku and hubot is the newest version. 我在运行OS X Yosemite版本10.10.3的MacBook Pro上,正在用TextMate版本2.0-beta.7.4编写代码,所有heroku和hubot都是最新版本。

In a class we had to install Hubot to our computer for local testing of code in terminal. 在一堂课中,我们必须将Hubot安装到我们的计算机上,以便在终端中对代码进行本地测试。 Once that code is fine then we push it to Heroku and test it with another bot. 一旦该代码正常,我们就将其推送到Heroku并使用另一个机器人对其进行测试。 Then if its fine with that bot the teacher pushes to git and we get to use Hubot in slack to show the code we made. 然后,如果对那个bot没问题,老师会推到git,然后我们就可以轻松地使用Hubot来显示我们编写的代码。

My problem is the code that I made isn't being seen by hubot in my terminal. 我的问题是,我的终端无法显示我编写的代码。 What can I do to fix this so I can move on to the next step? 我该怎么做才能解决此问题,以便继续进行下一步? All I've done is write the code and it never showed up to hubot in terminal. 我所做的就是编写代码,但它从未在终端中显示出来。

When I tried pushing to Heroku before I was suppose to I got this error. 当我尝试推到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

My code for these files are JavaScript ended so .js 这些文件的代码以JavaScript结尾,所以.js

This is thisclass.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.");
    });
}

My other file is that same exacept the information that would be displayed. 我的其他文件与将显示的信息相同。

in the code you pasted you are missing a ; 在您粘贴的代码中,您缺少; at the very end 在最后

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM