Forum: Ferret DRb server & aaf gem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John Joseph B. (Guest)
on 2007-03-31 09:41
(Received via mailing list)
I'm having problems getting the DRb server running with the aaf gem.
I tried it with the plugin installed in my application, and it
worked. I suspect the problem has something to do with the startup
scripts expecting certain files to be in certain relative file paths.

Any insights are appreciated, and maybe if you have time you can
update the wiki document :)

Thanks for a great tool.

John
Jens K. (Guest)
on 2007-03-31 13:27
(Received via mailing list)
On Sat, Mar 31, 2007 at 01:31:39AM -0400, John Joseph B. wrote:
> I'm having problems getting the DRb server running with the aaf gem.
> I tried it with the plugin installed in my application, and it
> worked. I suspect the problem has something to do with the startup
> scripts expecting certain files to be in certain relative file paths.

I guess you did create ferret_server.yml in RAILS_ROOT/config?
What's the exact error you get?

> Any insights are appreciated, and maybe if you have time you can
> update the wiki document :)

I just gave it a try ;-) However there's no gem-specific info yet, I'll
try to throw a script together that eases setting up a project to use
the aaf gem.


cheers,
Jens



--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
removed_email_address@domain.invalid | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
John Joseph B. (Guest)
on 2007-03-31 20:03
(Received via mailing list)
On Mar 31, 2007, at 5:25 AM, Jens K. wrote:

> On Sat, Mar 31, 2007 at 01:31:39AM -0400, John Joseph B. wrote:
>> I'm having problems getting the DRb server running with the aaf gem.
>> I tried it with the plugin installed in my application, and it
>> worked. I suspect the problem has something to do with the startup
>> scripts expecting certain files to be in certain relative file paths.
>
> I guess you did create ferret_server.yml in RAILS_ROOT/config?
> What's the exact error you get?

Yes, I created the ferret_server.yml in /config and added the remote
declaration to my models. Then I put the three startup scripts into /
script/aaf/, and I was trying to run them from there. I got errors
similar to the ones in the comments of your blog post announcing AAF
0.4.0[1]

A blog post[2] mentions something that I think the wiki does not,
"add AAF_REMOTE = true to your environment file". Is this necessary?

Thanks,
John

[1] http://www.jkraemer.net/2007/3/24/acts_as_ferret-0-4-0-rie
[2] http://www.subelsky.com/2007/03/pitfalls-of-actsas...
drbserver.html
John Joseph B. (Guest)
on 2007-03-31 20:12
(Received via mailing list)
On Mar 31, 2007, at 12:02 PM, John Joseph B. wrote:
>  I got errors similar to the ones in the comments of your blog post
> announcing AAF 0.4.0[1]

> [1] http://www.jkraemer.net/2007/3/24/acts_as_ferret-0-4-0-rie

This is actually not correct. Here is the error I am getting:

jjb-g4-laptop:~/digitalpulp/ffog$ RAILS_ENV=production script/aaf/
ferret_start
./script/../config/../vendor/rails/railties/lib/commands/runner.rb:
45: ./script/../config/../vendor/rails/activerecord/lib/../../
activesupport/lib/active_support/dependencies.rb:266:in
`load_missing_constant': uninitialized constant ActsAsFerret (NameError)
         from ./script/../config/../vendor/rails/activerecord/
lib/../../activesupport/lib/active_support/dependencies.rb:452:in
`const_missing'
         from ./script/../config/../vendor/rails/activerecord/
lib/../../activesupport/lib/active_support/dependencies.rb:464:in
`const_missing'
         from (eval):22
         from script/runner:3:in `eval'
         from ./script/../config/../vendor/rails/railties/lib/
commands/runner.rb:45
         from script/runner:3
Jens K. (Guest)
on 2007-04-01 15:32
(Received via mailing list)
On Sat, Mar 31, 2007 at 12:11:41PM -0400, John Joseph B. wrote:
> ferret_start
> ./script/../config/../vendor/rails/railties/lib/commands/runner.rb:
> 45: ./script/../config/../vendor/rails/activerecord/lib/../../
> activesupport/lib/active_support/dependencies.rb:266:in
> `load_missing_constant': uninitialized constant ActsAsFerret (NameError)

do you have 'require 'acts_as_ferret'' somewhere in your
environment.rb?

what version of Rails do you use?

J4i, the AAF_REMOTE environment variable is only used in aaf unit tests
to determine if the tests should run in local or remote mode, it's not
used elsewhere and therefore won't help, but can't hurt much either ;)
I also added a comment clarifying this to the blog post you mentioned.


Jens

--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
removed_email_address@domain.invalid | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
John Joseph B. (Guest)
on 2007-04-01 20:27
(Received via mailing list)
On Apr 1, 2007, at 7:31 AM, Jens K. wrote:

>
> do you have 'require 'acts_as_ferret'' somewhere in your
> environment.rb?

That did the trick! (I didn't need to require AAF in the environment
before because I was requiring it in the models)


> what version of Rails do you use?

1.2.2


> J4i, the AAF_REMOTE environment variable is only used in aaf unit
> tests
> to determine if the tests should run in local or remote mode, it's not
> used elsewhere and therefore won't help, but can't hurt much either ;)
> I also added a comment clarifying this to the blog post you mentioned.

Great. Care to note this on the wiki as well? :) I was going to but
did not feel confident about wording it properly.


Thanks,
John
This topic is locked and can not be replied to.