I feel that realizing a chatbot - in a specific programming language, - with a standard framework (Rails), - for a specific channel (Messenger), is an ERROR, in the log terms.
BTW, I realized naif, my personal micro framework just to build chatbots in Ruby (see slides: https://github.com/solyaris/naif),
Nevertheless, I decided to NOT publish the code and no more deepen that "hard-coded" way, instead I suggest to use and support a chatbot scripting (meta)language. About rationales, I wrote a bunch of articles: www.medium.com/@solyarisoftware
I support opensource great ChatScript (https://github.com/bwilcox-1234/ChatScript/) and BTW I wrote simple client in Ruby (https://github.com/solyaris/rChatScript/)
My two cents giorgio @solyarisoftware