[Aiml-programr-developers] Tests and Architecture

mauro at cicio.org mauro at cicio.org
Mon Sep 17 08:26:44 EDT 2007


Hi,

sorry, probably the webserver.rb is a wrapper that I left halfway... :-(

Please do the following:
1 - cd to the top level directory in both shells
$ cd $yourpath/pRcomm

2 - in first shell run
$ ruby lib/comm/service.rb

3 - in the second run
$ ruby browser.rb

Ciao,
Mauro

On 17/09/2007, Nicholas H.Tollervey <ntoll at ntoll.org> wrote:
> Mauro,
>
> The code you describe in the following example doesn't work. I
> definitely have both Rails and drb installed. When I run the command
> "ruby webserver.rb" I get the following error:
>
> webserver.rb:24:in `require': no such file to load -- comm/p_r_plugin
> (LoadError)
>         from webserver.rb:24
>
> Obviously, the path is wrong. As a quick hack I just copied the
> webserver.rb file into the lib directory and ran from there. However I
> just got returned to the command prompt - upon investigation I notice
> that webserver only contains class definitions, not any actual code to
> instantiate and run a service. Is this correct?
>
> When I run "browser.rb" I get the following errors:
>
> ./lib/comm/p_r_plugin.rb:24:in `readlines': No such file or directory -
> /tmp/pr_bot_address (Errno::ENOENT)
>         from ./lib/comm/p_r_plugin.rb:24:in `initialize'
>         from ./lib/comm/p_r_plugin.rb:14:in `new'
>         from ./lib/comm/p_r_plugin.rb:14:in `hanlde'
>         from ./webserver.rb:18:in `get'
>         from browser.rb:18:in `start'
>         from browser.rb:23
>
> Could you check that the code you sent us is correct? I'd love to get it
> working at see what exactly is happening.
>
> Best wishes,
>
> Nicholas
>
>
> >
> > To get on a more concrete ground, I tried to put down a very small
> > (but running) prototype that could help us in discussing
> > - Ruby coding style
> > - Naming/Metaphores
> > - key concepts and separation of concerns
> >
> > If you guys find the time to run the program, read it, ask questions
> > and so on, I think it would help a lot.
> >
> > The prog structure is:
> > |-- browser.rb
> > |-- lib
> > |   |-- comm
> > |   |   |-- bot_proxy.rb
> > |   |   |-- p_r_plugin.rb
> > |   |   |-- request.rb
> > |   |   |-- response.rb
> > |   |   |-- service.rb
> > |   |   `-- session_manager.rb
> > |   |-- program_r
> > |   |   `-- bot.rb
> > |   `-- rails
> > |       `-- session.rb
> > `-- webserver.rb
> > To run it just open 2 shells. In the first one run
> > $ ruby webserver.rb
> > in the other one
> > $ ruby browser.rb
> > On the browser side you should see a prompt: enter a word and enter
> > (you'll get back the reversed word)
> > Prerequisites: 'drb' (is it in the distribution?)
> >
>


More information about the Aiml-programr-developers mailing list