After completing the development of my Hubot, I decided to deploy it to Heroku.
I followed the tutorial on Github’s Hubot guideline as here.
$ cd [path-to-your-hubot-folder] $ heroku login # Setup git (if not yet). $ git init $ git add . $ git commit -m "Initial commit" # Create a new heroku application. $ heroku create # Push to heroku master. $ git push heroku master # Set Slack token for heroku (Can be found at # https://[your-slack-channel].slack.com/home # and under your Hubot app config). $ heroku config:set HUBOT_SLACK_TOKEN=[xoxb-YOUR-TOKEN] # Set heroku keep alive url (To keep your bot active). $ heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web-url | cut -d= -f2)
But my bot is not working at all, it keeps sleeping on the new Heroku’s bed and not responded to any of my commands.
I checked the build log on Heroku dashboard, it shows a lot of node modules are lack.
I viewed the .git_ignore file and its content:
node_modules .DS_Store* .hubot_history
So entire node_modules is ignored during commit and pushing to Heroku. So I think that it’s the reason why my bot is not working after deploying.
I remove that line, add node_modules then commit and push again to Heroku.
And finally… the monster awakens.