On 25 Aug 2005, at 21:49, Kevin Brown wrote:

> I will start by admitting I'm new to Ruby, but am generally a quick  
> learner.
> Anyway, I put together a simple DRb test program which works fine.   
> I'm now
> trying to do the real thing, where I need a graphical front end to
> communicate with a backend on localhost for the moment, but  
> eventually, on
> another machine.
>
> My problem is that the functions seem to disappear.  If the code in  
> my class
> is like below:
>
>     DRb.start_service()
>     @connection = DRbObject.new(nil, 'druby://localhost:9000')
>     @connection.login
>
> I get the following output:
>
> (druby://localhost:9000) /usr/lib/ruby/1.8/drb/drb.rb:1478:in  
> `login': wrong
> number of arguments (0 for 1) (ArgumentError)
>         from ./dli-frontend.rb:33:in `initialize'
>         from ./dli-frontend.rb:62:in `new'
>         from ./dli-frontend.rb:62
>
> Which is correct.  login takes one argument.  I then supply the  
> argument with:
>
>     DRb.start_service()
>     @connection = DRbObject.new(nil, 'druby://localhost:9000')
>     user = User.new
>     @connection.login(user)
>
> Here's the output:
>
> (druby://localhost:9000) ./db/db.rb:999:in `login': undefined  
> method `login'
> for #<DRb::DRbUnknown:0xb72c2fec> (NoMethodError)

^^^
Looks like you're missing a DRbUndumped somewhere.

>         from (druby://localhost:9000) ./listener.rb:31:in `login'
>         from ./dli-frontend.rb:33:in `initialize'
>         from ./dli-frontend.rb:62:in `new'
>         from ./dli-frontend.rb:62
>
> If there's more info I need to provide, please let me know...   
> Otherwise, any
> ideas as to what I'm doing wrong?

How about some code?

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04