Last Updated: April 24, 2021
·
3.942K
· abhshkdz

Building up Hubot on Gtalk (deployed on Heroku)

A few days back I set up Github's awesome chat bot - Hubot on Gtalk. Here's how I did it.

wget https://github.com/downloads/github/hubot/hubot-2.2.0.tar.gz
tar zxvf hubot-*.tar.gz
cd hubot/
vim Procfile
app: bin/hubot -a gtalk -n Hubot

vim package.json
{
  "name":        "hosted-hubot",
  "version":     "2.2.0",
  "author":      "GitHub Inc.",
  "keywords":    "github hubot campfire bot",
  "description": "A simple helpful Robot for your Company",
  "licenses":     [{
    "type":       "MIT",
    "url":        "http://github.com/github/hubot/raw/master/LICENSE"
  }],

  "repository" : {
    "type" : "git",
    "url" : "http://github.com/github/hubot.git"
  },

  "dependencies": {
    "hubot-gtalk": ">= 0.0.1",  
    "hubot": ">= 2.2.0",
    "hubot-scripts": ">=2.0.8",
    "optparse": ">= 1.0.3"
  },

  "engines": {
    "node": "0.6.x",
    "npm": "1.0.x"
  }
}

git init
git add .
git commit -m "initial commit"
heroku create --stack cedar
git push heroku master
heroku ps:scale app=1
heroku addons:add redistogo:nano //Requires verified Heroku account
heroku config:add HUBOT_GTALK_USERNAME="example@domain.com" HUBOT_GTALK_PASSWORD="account password"
heroku ps

All the scripts are written in coffeescript. You can write one on your own or use one of the existing ones from <a href="http://hubot-script-catalog.herokuapp.com/">hubot-scripts-catalog</a>

5 Responses
Add your response

hmm... I followed your instructions and heroku ps gave me:
app.1 crashed for 7s bin/hubot -a gtalk -n Hubot

heroku logs shows the first error is:
ERROR Cannot load adapter gtalk - Error: Cannot find module '../build/Release/node_expat.node'

over 1 year ago ·

Try doing an npm install before pushing to heroku.

over 1 year ago ·

thanks! I did that, and removed node_modules from .gitignore, but now when I push to heroku it gets rejected. node-gyp was not found, so I did node install node-gyp, but now it rejects and says sh: node-gyp: Permission denied.

Any help would be appreciated.

over 1 year ago ·

i started over, used the download from hubot's website and used newer version numbers for npm and it's working! well, i have to authorize the app on my google account first...

over 1 year ago ·

yes I updated to npm 1.1x and it worked

over 1 year ago ·