简体   繁体   English

在Ubuntu中本地测试Hubot

[英]Testing Hubot locally in Ubuntu

Hi Stackoverflow community, 您好Stackoverflow社区,

Well the thing is that I'm working on a script for hubot. 好吧,我正在为hubot编写脚本。 Before starting to code I'm trying to test some hubot commands in the command line (I already did it in Windows but for some reasons I've to change to Ubuntu environment to start to code this brand new custom hubot) I'd like to be able to write in the terminal >Hubot PING and get a response PONG to start to work. 在开始编写代码之前,我尝试在命令行中测试一些hubot命令 (我已经在Windows中进行过测试,但是由于某些原因,我不得不改用Ubuntu环境以开始对此全新的自定义hubot进行编码)就能在终端>Hubot PING编写并获得响应PONG以开始工作。

Till now I've already installed Node.js through nodenv https://github.com/OiNutter/nodenv and I tested my node >node -v , got v0.10.22 . 到现在nodenv ,我已经通过nodenv https://github.com/OiNutter/nodenv安装了Node.js,并测试了我的节点>node -v ,得到了v0.10.22 I forked my hubot and cloned locally and then apply ~./hubot> npm install to get all the dependencies and everything seems OK. 我分叉了hubot并在本地克隆,然后应用~./hubot> npm install来获取所有依赖关系,一切似乎都还可以。 Then I went to the installation folder >cd node_modules/hosted-hubot which has a folder called bin , inside the hubot folder. 然后,我转到安装文件夹>cd node_modules/hosted-hubot ,该文件夹在hubot文件夹中有一个名为bin的文件夹。

So, till this point everything seemed OK and I tried to do in the command line: ./bin/hubot and I'm not able to run hubot locally, it gave me: nodenv: version `v0.8' is not installed . 因此,到现在为止一切似乎都还可以,我尝试在命令行中执行: ./bin/hubot ,但我无法在本地运行hubot,这给了我: nodenv:未安装版本“ v0.8” I tried to install an older version of node 0.8 and got the same message. 我尝试安装旧版本的节点0.8,并得到了相同的消息。

So that's it, hope you guys can help me to try to test my hubot locally 就是这样,希望你们能帮助我尝试在本地测试我的hubot

Thanks in advance!!! 提前致谢!!!

I made a fresh install and I instal node.js without nodenv and everything works properly. 我进行了全新安装,并安装了没有nodenv的node.js,一切正常。 It may not be the better solution but it was what I did. 可能不是更好的解决方案,但这是我所做的。

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

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