我在Linux上安装hubot,然后跟着the instructions,没有收到任何错误。
然而,当我尝试实际运行我的hubot时,我遇到了问题。首先,我根据链接教程最后的说明尝试守护hubot。 start hubot
返回了错误start: Unknown job: hubot
。所以我备份并尝试/opt/hubot/bin/hubot --name Ro\ Bot --adapter campfire
并得到了一系列错误:
/opt/hubot/bin/hubot: line 11: Hubot: command not found
/opt/hubot/bin/hubot: line 12: Fs: command not found
/opt/hubot/bin/hubot: line 13: Path: command not found
/opt/hubot/bin/hubot: line 14: HTTP: command not found
/opt/hubot/bin/hubot: line 15: Creator: command not found
/opt/hubot/bin/hubot: line 16: OptParse: command not found
/opt/hubot/bin/hubot: line 18: Switches: command not found
/opt/hubot/bin/hubot: line 19: [: missing `]'
/opt/hubot/bin/hubot: line 20: [: missing `]'
/opt/hubot/bin/hubot: line 21: [: missing `]'
/opt/hubot/bin/hubot: line 22: [: missing `]'
/opt/hubot/bin/hubot: line 23: [: missing `]'
/opt/hubot/bin/hubot: line 24: [: missing `]'
/opt/hubot/bin/hubot: line 25: [: missing `]'
/opt/hubot/bin/hubot: line 26: [: --version,: binary operator expected
/opt/hubot/bin/hubot: line 27: ]: command not found
/opt/hubot/bin/hubot: line 29: Options: command not found
/opt/hubot/bin/hubot: line 30: adapter:: command not found
/opt/hubot/bin/hubot: line 31: alias:: command not found
/opt/hubot/bin/hubot: line 32: create:: command not found
/opt/hubot/bin/hubot: line 33: enableHttpd:: command not found
/opt/hubot/bin/hubot: line 34: name:: command not found
/opt/hubot/bin/hubot: line 35: path:: command not found
/opt/hubot/bin/hubot: line 37: syntax error near unexpected token `('
/opt/hubot/bin/hubot: line 37: `Parser = new OptParse.OptionParser(Switches)'
尝试从发行包安装而不是在git中进行克隆会在此过程的早期导致不同的错误:
root@server:/opt# wget https://github.com/downloads/github/hubot/hubot-2.2.0.tar.gz
root@server:/opt# npm install
npm ERR! Couldn't read dependencies.
npm ERR! Error: ENOENT, no such file or directory '/opt/package.json'
npm ERR! System Linux 2.6.35.4-rscloud
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /opt
npm ERR! node -v v0.6.9
npm ERR! npm -v 1.1.0-3
npm ERR! path /opt/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/opt/package.json'
npm ERR! errno {}
npm not ok
我尝试了npm cache clean
,但它没有帮助。
我不知道该怎么做,而且我对Hubot或其运行的任何框架都不是很熟悉,因此任何有关如何开始对此进行故障排除的信息都会有所帮助。
答案 0 :(得分:1)
尝试从the release package安装(而不是从git clone
安装),这为我解决了一些随机问题。
答案 1 :(得分:0)
我怀疑您没有按照上面引用的“将Hubot部署到UNIX上”链接的“安装依赖项”部分进行操作。具体来说,似乎像bash这样的常规shell试图解释脚本而不是咖啡脚本解释器。如果输入
coffee
在你的shell提示符下,没有得到
coffee>
提示,请重新阅读安装说明的第一部分。