# Rails and a Jabber (Gtalk) Bot

**URL:** <https://www.ruby-forum.com/t/rails-and-a-jabber-gtalk-bot/71373>\
**Category:** Rails\
**Created:** [October 7, 2006, 11:24pm UTC](https://www.ruby-forum.com/t/rails-and-a-jabber-gtalk-bot/71373 "2006-10-07T23:24:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_MacCaw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@Alex\_MacCaw](https://www.ruby-forum.com/u/Alex_MacCaw)\
**Post date:** [October 7, 2006, 11:24pm UTC](https://www.ruby-forum.com/t/rails-and-a-jabber-gtalk-bot/71373/1 "2006-10-07T23:24:31Z")

</div>

I’m building a jabber bot for my cms eribium ([http://www.eribium.org](http://www.eribium.org)).  
Is it possible to give access to the script/console of rails? Obviously  
the bot can’t be part of rails as the long requests would crash the fast  
cgi - but is there a way to “include” rails? All I’m looking for is a  
way of querying the rails app for information and status, as well as a  
way of CRUDing pages. Any ideas?

---

<div class="post-metadata">

**Author:** ![Alex\_MacCaw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@Alex\_MacCaw](https://www.ruby-forum.com/u/Alex_MacCaw)\
**Post date:** [October 8, 2006, 12:11am UTC](https://www.ruby-forum.com/t/rails-and-a-jabber-gtalk-bot/71373/2 "2006-10-08T00:11:07Z")

</div>

On Saturday 07 October 2006 23:24, Alex MacCaw wrote:

> I’m building a jabber bot for my cms eribium  
> ([http://www.eribium.org](http://www.eribium.org)). Is it possible to give access to the  
> script/console of rails? Obviously the bot can’t be part of rails as  
> the long requests would crash the fast cgi - but is there a way to  
> “include” rails?

Hi Alex,

the bot can’t be part of the process serving web requests, but it can  
access the app’s model just the same. If you  
require ‘config/environment’ in the bot you have all you need.

> All I’m looking for is a way of querying the rails  
> app for information and status, as well as a way of CRUDing pages.

I may not understand what you’re trying to do, but where do pages come  
into the mix? What more do you need when you can get at the model  
directly?

Michael

–  
Michael S.  
[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://www.schuerig.de/michael/](http://www.schuerig.de/michael/)

---

<div class="post-metadata">

**Author:** ![Alex\_MacCaw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@Alex\_MacCaw](https://www.ruby-forum.com/u/Alex_MacCaw)\
**Post date:** [October 8, 2006, 1:53pm UTC](https://www.ruby-forum.com/t/rails-and-a-jabber-gtalk-bot/71373/3 "2006-10-08T13:53:08Z")

</div>

Thanks Michael,  
All working now.  
Is is possible to give access to the rails console (a bit like  
[http://tryruby.hobix.com/](http://tryruby.hobix.com/)) through the jabber interface.

> the bot can’t be part of the process serving web requests, but it can  
> access the app’s model just the same. If you  
> require ‘config/environment’ in the bot you have all you need.

---

<div class="post-metadata">

**Author:** ![Alex\_MacCaw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@Alex\_MacCaw](https://www.ruby-forum.com/u/Alex_MacCaw)\
**Post date:** [October 8, 2006, 2:56pm UTC](https://www.ruby-forum.com/t/rails-and-a-jabber-gtalk-bot/71373/4 "2006-10-08T14:56:12Z")

</div>

On Sunday 08 October 2006 13:53, Alex MacCaw wrote:

> Thanks Michael,  
> All working now.  
> Is is possible to give access to the rails console (a bit like  
> [http://tryruby.hobix.com/](http://tryruby.hobix.com/)) through the jabber interface.
> 
> > the bot can’t be part of the process serving web requests, but it  
> > can access the app’s model just the same. If you  
> > require ‘config/environment’ in the bot you have all you need.

I think there’s a gem called tryruby or something available on  
RubyForge. Unfortunately, it appears to be down at the moment, so I  
cannot check.

Michael

–  
Michael S.  
[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://www.schuerig.de/michael/](http://www.schuerig.de/michael/)

---

<div class="post-metadata">

**Author:** ![Alex\_MacCaw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@Alex\_MacCaw](https://www.ruby-forum.com/u/Alex_MacCaw)\
**Post date:** [October 10, 2006, 5:51am UTC](https://www.ruby-forum.com/t/rails-and-a-jabber-gtalk-bot/71373/5 "2006-10-10T05:51:32Z")

</div>

On Oct 8, 2006, at 4:53 AM, Alex MacCaw wrote:

> Thanks Michael,  
> All working now.  
> Is is possible to give access to the rails console (a bit like  
> [http://tryruby.hobix.com/](http://tryruby.hobix.com/)) through the jabber interface.

Cool, its working!

great, so now I’m curious… what is the gist of what you’re trying to  
do?

–  
Craig B.

AIM: kreiggers
