Heroku Ruby App

Thursday, Feb 11, 2021 | 1 minute read | Updated at Thursday, Feb 11, 2021

@

In my bid to host my ruby based telegram bot on heroku,

I had to jump through hoops due to the fact that my bot was not using webhooks but the polling alternative.

This required that I run a script to initiate the bot. This also meant that my bot had no web interface.

Most important REMEMBER TO SET ENV VARIABLES IN HEROKU'S CONFIG VAR

Add a Procfile to the root of your app.

Sample Procfile:

  bot: bundle exec ruby app.rb

Make sure you have installed Heroku’s CLI. Run the following command: heroku ps:scale bot=1 -a <appname>

Note here that ‘bot’ here is same and similar to ‘bot’ in the procfile

and

heroku run bundle exec ruby <app.rb> -a <appname>

Thats it. This should get you going?

© 2025 Reveries

🌱 Powered by Hugo with theme Dream.

Me

Self Introduction

Passionate about people & technology. With a plethora of experience managing both people and technology. I am currently a Technical Officer with the Communications Division of CSIR - Institute for Scientific and Technological Information. Here, I am responsible for transforming research outputs into software, tools, equipments and communication systems as tools for national development.

I am BIG about community and have spent the better part of the last decade; growing and managing various tech communities in Ghana. Most recent being the Google Developer Group (GDG). I ASPIRE to INSPIRE.

I like to dabble in a lot of technology related things; from code to Rpi’s.