Hi, I have my Model as follows: class Mutation < ActiveRecord::Base acts_as_ferret ({:fields => {:description=>{}, :product_id=>{:index => :untokenized}, :product_description=>{}, :product_label_description=>{}, :product_label_free=>{}, :product_product_id_supplier=>{}, :product_description_supplier=>{}, :supplier_description=>{}, :pub_date_sort => {:index => :untokenized_omit_norms, :term_vector => :no}, :location_id => {:index => :untokenized}, :tab => {:index => :untokenized}},:remote => false}) THis will do the ferret locally without the DRB server. Works ok. If I change this to: class Mutation < ActiveRecord::Base acts_as_ferret ({:fields => {:description=>{}, :product_id=>{:index => :untokenized}, :product_description=>{}, :product_label_description=>{}, :product_label_free=>{}, :product_product_id_supplier=>{}, :product_description_supplier=>{}, :supplier_description=>{}, :pub_date_sort => {:index => :untokenized_omit_norms, :term_vector => :no}, :location_id => {:index => :untokenized}, :tab => {:index => :untokenized}},:remote => true}) I get the following error when starting ferret server (and also when starting mongrel) /opt/local/lib/ruby/1.8/drb/drb.rb:736:in `open'': druby://localhost:9010 - #<Errno::ECONNREFUSED: Connection refused - connect(2)> (DRb::DRbConnError) from /opt/local/lib/ruby/1.8/drb/drb.rb:729:in `each'' from /opt/local/lib/ruby/1.8/drb/drb.rb:729:in `open'' from /opt/local/lib/ruby/1.8/drb/drb.rb:1189:in `initialize'' from /opt/local/lib/ruby/1.8/drb/drb.rb:1169:in `new'' from /opt/local/lib/ruby/1.8/drb/drb.rb:1169:in `open'' from /opt/local/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'' from /opt/local/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'' from /opt/local/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'' ... 29 levels... from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:39 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from script/runner:3 When I change the :remote back to false, both Mongrel as DRB start without an error message. -- Posted via http://www.ruby-forum.com/.
Hi! Do you use the latest acts_as_ferret (0.4.1)? Jens On Wed, Jul 25, 2007 at 01:04:01PM +0200, Izit Izit wrote:> Hi, > > I have my Model as follows: > > class Mutation < ActiveRecord::Base > acts_as_ferret ({:fields => {:description=>{}, > :product_id=>{:index => :untokenized}, > :product_description=>{}, > :product_label_description=>{}, > :product_label_free=>{}, > :product_product_id_supplier=>{}, > :product_description_supplier=>{}, > :supplier_description=>{}, > :pub_date_sort => {:index => :untokenized_omit_norms, :term_vector => > :no}, > :location_id => {:index => :untokenized}, > :tab => {:index => :untokenized}},:remote => false}) > > THis will do the ferret locally without the DRB server. Works ok. > > If I change this to: > > class Mutation < ActiveRecord::Base > acts_as_ferret ({:fields => {:description=>{}, > :product_id=>{:index => :untokenized}, > :product_description=>{}, > :product_label_description=>{}, > :product_label_free=>{}, > :product_product_id_supplier=>{}, > :product_description_supplier=>{}, > :supplier_description=>{}, > :pub_date_sort => {:index => :untokenized_omit_norms, :term_vector => > :no}, > :location_id => {:index => :untokenized}, > :tab => {:index => :untokenized}},:remote => true}) > > I get the following error when starting ferret server (and also when > starting mongrel) > > /opt/local/lib/ruby/1.8/drb/drb.rb:736:in `open'': druby://localhost:9010 > - #<Errno::ECONNREFUSED: Connection refused - connect(2)> > (DRb::DRbConnError) > from /opt/local/lib/ruby/1.8/drb/drb.rb:729:in `each'' > from /opt/local/lib/ruby/1.8/drb/drb.rb:729:in `open'' > from /opt/local/lib/ruby/1.8/drb/drb.rb:1189:in `initialize'' > from /opt/local/lib/ruby/1.8/drb/drb.rb:1169:in `new'' > from /opt/local/lib/ruby/1.8/drb/drb.rb:1169:in `open'' > from /opt/local/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'' > from /opt/local/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'' > from /opt/local/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'' > ... 29 levels... > from > /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:39 > from > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > from > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > from script/runner:3 > > > When I change the :remote back to false, both Mongrel as DRB start > without an error message. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-- 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
I am running revision 217 of the AAF plugin Strange thing is that I have another model where remote => true is configured but this does not give an issue, only this specific model generates the problem as soon as remote is set to true. The other model looks like this: acts_as_ferret ({:fields => [:description,:label_description,:label_free,:product_id_supplier,:description_supplier,:supplier_description] , :remote => true}) Jens Kraemer wrote:> Hi! > > > Do you use the latest acts_as_ferret (0.4.1)? > > Jens > > > On Wed, Jul 25, 2007 at 01:04:01PM +0200, Izit Izit wrote: >> :product_product_id_supplier=>{}, >> >> :no}, >> from /opt/local/lib/ruby/1.8/drb/drb.rb:729:in `open'' >> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Ferret-talk mailing list >> Ferret-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ferret-talk >> > > -- > 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 > kraemer at webit.de | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold, Hagen Malessa-- Posted via http://www.ruby-forum.com/.
Some more info. What I also find strange is that when I start Mongrel it shows: => Booting Mongrel (use ''script/server webrick'' to force WEBrick) => Rails application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... Using AdapterExtensions Asked for a remote server ? false, ENV["FERRET_USE_LOCAL_INDEX"] is nil, looks like we are not the server Will use local index. using index in script/../config/../index/development/mutation default field list: [:supplier_description, :description, :product_description, :pub_date_sort, :product_label_description, :product_label_free, :product_product_id_supplier, :product_description_supplier] ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reload (without restart). It might not work well. ** Mongrel available at 0.0.0.0:3000 ** Use CTRL-C to stop. Why is it refering to AAF during startup. It only does this for the Model I have the issue with, other models with AAF configured do not show up during Mongrel startup. I have also check it with webrick and some occurs. Izit Izit wrote:> I am running revision 217 of the AAF plugin > > Strange thing is that I have another model where remote => true is > configured but this does not give an issue, only this specific model > generates the problem as soon as remote is set to true. > > The other model looks like this: > > acts_as_ferret ({:fields => > [:description,:label_description,:label_free,:product_id_supplier,:description_supplier,:supplier_description] > , :remote => true}) > > > > > Jens Kraemer wrote: >> Hi! >> >> >> Do you use the latest acts_as_ferret (0.4.1)? >> >> Jens >> >> >> On Wed, Jul 25, 2007 at 01:04:01PM +0200, Izit Izit wrote: >>> :product_product_id_supplier=>{}, >>> >>> :no}, >>> from /opt/local/lib/ruby/1.8/drb/drb.rb:729:in `open'' >>> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >>> Posted via http://www.ruby-forum.com/. >>> _______________________________________________ >>> Ferret-talk mailing list >>> Ferret-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ferret-talk >>> >> >> -- >> 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 >> kraemer at webit.de | www.webit.de >> >> Amtsgericht Dresden | HRB 15422 >> GF Sven Haubold, Hagen Malessa-- Posted via http://www.ruby-forum.com/.
AFter some debugging, I got it working: acts_as_ferret (:fields => {:description=>{}, :product_id=>{:index => :untokenized}, :product_description=>{}, :product_label_description=>{}, :product_label_free=>{}, :product_product_id_supplier=>{}, :product_description_supplier=>{}, :supplier_description=>{}, :pub_date_sort => {:index => :untokenized_omit_norms, :term_vector => :no}, :location_id => {:index => :untokenized}, :tab => {:index => :untokenized}},:remote=>true) Small difference in usage of {} Izit Izit wrote:> Some more info. > > What I also find strange is that when I start Mongrel it shows: > > => Booting Mongrel (use ''script/server webrick'' to force WEBrick) > => Rails application starting on http://0.0.0.0:3000 > => Call with -d to detach > => Ctrl-C to shutdown server > ** Starting Mongrel listening at 0.0.0.0:3000 > ** Starting Rails with development environment... > Using AdapterExtensions > Asked for a remote server ? false, ENV["FERRET_USE_LOCAL_INDEX"] is nil, > looks like we are not the server > Will use local index. > using index in script/../config/../index/development/mutation > default field list: [:supplier_description, :description, > :product_description, :pub_date_sort, :product_label_description, > :product_label_free, :product_product_id_supplier, > :product_description_supplier] > ** Rails loaded. > ** Loading any Rails specific GemPlugins > ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no > restart). > ** Rails signals registered. HUP => reload (without restart). It might > not work well. > ** Mongrel available at 0.0.0.0:3000 > ** Use CTRL-C to stop. > > Why is it refering to AAF during startup. It only does this for the > Model I have the issue with, other models with AAF configured do not > show up during Mongrel startup. I have also check it with webrick and > some occurs. > > > > Izit Izit wrote: >> I am running revision 217 of the AAF plugin >> >> Strange thing is that I have another model where remote => true is >> configured but this does not give an issue, only this specific model >> generates the problem as soon as remote is set to true. >> >> The other model looks like this: >> >> acts_as_ferret ({:fields => >> [:description,:label_description,:label_free,:product_id_supplier,:description_supplier,:supplier_description] >> , :remote => true}) >> >> >> >> >> Jens Kraemer wrote: >>> Hi! >>> >>> >>> Do you use the latest acts_as_ferret (0.4.1)? >>> >>> Jens >>> >>> >>> On Wed, Jul 25, 2007 at 01:04:01PM +0200, Izit Izit wrote: >>>> :product_product_id_supplier=>{}, >>>> >>>> :no}, >>>> from /opt/local/lib/ruby/1.8/drb/drb.rb:729:in `open'' >>>> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >>>> Posted via http://www.ruby-forum.com/. >>>> _______________________________________________ >>>> Ferret-talk mailing list >>>> Ferret-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ferret-talk >>>> >>> >>> -- >>> 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 >>> kraemer at webit.de | www.webit.de >>> >>> Amtsgericht Dresden | HRB 15422 >>> GF Sven Haubold, Hagen Malessa-- Posted via http://www.ruby-forum.com/.
On Wed, Jul 25, 2007 at 02:57:58PM +0200, Izit Izit wrote:> Some more info. > > What I also find strange is that when I start Mongrel it shows: > > => Booting Mongrel (use ''script/server webrick'' to force WEBrick) > => Rails application starting on http://0.0.0.0:3000 > => Call with -d to detach > => Ctrl-C to shutdown server > ** Starting Mongrel listening at 0.0.0.0:3000 > ** Starting Rails with development environment... > Using AdapterExtensions > Asked for a remote server ? false, ENV["FERRET_USE_LOCAL_INDEX"] is nil, > looks like we are not the server > Will use local index. > using index in script/../config/../index/development/mutation > default field list: [:supplier_description, :description, > :product_description, :pub_date_sort, :product_label_description, > :product_label_free, :product_product_id_supplier, > :product_description_supplier] > ** Rails loaded. > ** Loading any Rails specific GemPlugins > ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no > restart). > ** Rails signals registered. HUP => reload (without restart). It might > not work well. > ** Mongrel available at 0.0.0.0:3000 > ** Use CTRL-C to stop. > > Why is it refering to AAF during startup. It only does this for the > Model I have the issue with, other models with AAF configured do not > show up during Mongrel startup. I have also check it with webrick and > some occurs.This output should go to the log file normally, not sure why you see it on stdout. However it looks like you didn''t specify :remote => true in this case (that''s the "Asked for a remote server?" line). Interesting would be the output and log files from starting the DRb server. Most of the time these problems stem from the DRb server not realizing that it *is* the DRb server, resulting in aaf inside the DRb server trying to connect to another (of course non-existent) DRb server. 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
On Wed, Jul 25, 2007 at 03:41:43PM +0200, Izit Izit wrote:> AFter some debugging, I got it working: > > acts_as_ferret (:fields => {:description=>{}, > :product_id=>{:index => :untokenized}, > :product_description=>{}, > :product_label_description=>{}, > :product_label_free=>{}, > :product_product_id_supplier=>{}, > :product_description_supplier=>{}, > :supplier_description=>{}, > :pub_date_sort => {:index => :untokenized_omit_norms, :term_vector => > :no}, > :location_id => {:index => :untokenized}, > :tab => {:index => :untokenized}},:remote=>true) > > Small difference in usage of {}Argh :-) -- 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
The same problem is back again. I moved my development app to production (dev = OS X, prod = Linux). started drb server and same problem occurs again. Jens Kraemer wrote:> On Wed, Jul 25, 2007 at 03:41:43PM +0200, Izit Izit wrote: >> :pub_date_sort => {:index => :untokenized_omit_norms, :term_vector => >> :no}, >> :location_id => {:index => :untokenized}, >> :tab => {:index => :untokenized}},:remote=>true) >> >> Small difference in usage of {} > > Argh :-) > > > -- > 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 > kraemer at webit.de | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold, Hagen Malessa-- Posted via http://www.ruby-forum.com/.
On Thu, Jul 26, 2007 at 09:14:36AM +0200, Izit Izit wrote:> The same problem is back again. I moved my development app to production > (dev = OS X, prod = Linux). started drb server and same problem occurs > again.So what does the DRb server log when it''s started? Jens -- Jens Kr?mer http://www.jkraemer.net/ - Blog http://www.omdb.org/ - The new free film database
cli command outputs: /usr/lib/ruby/1.8/drb/drb.rb:736:in `open'': druby://localhost:9010 - #<Errno::ECONNREFUSED: Connection refused - connect(2)> (DRb::DRbConnError) from /usr/lib/ruby/1.8/drb/drb.rb:729:in `each'' from /usr/lib/ruby/1.8/drb/drb.rb:729:in `open'' from /usr/lib/ruby/1.8/drb/drb.rb:1189:in `initialize'' from /usr/lib/ruby/1.8/drb/drb.rb:1169:in `new'' from /usr/lib/ruby/1.8/drb/drb.rb:1169:in `open'' from /usr/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'' from /usr/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'' from /usr/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'' ... 30 levels... from /usr/lib64/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:39 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from script/runner:3 Jens Kraemer wrote:> On Thu, Jul 26, 2007 at 09:14:36AM +0200, Izit Izit wrote: >> The same problem is back again. I moved my development app to production >> (dev = OS X, prod = Linux). started drb server and same problem occurs >> again. > > So what does the DRb server log when it''s started? > > Jens > -- > Jens Kr?mer > http://www.jkraemer.net/ - Blog > http://www.omdb.org/ - The new free film database-- Posted via http://www.ruby-forum.com/.
Some experimenting: In my problem model I put remote to false. Started ferret drb server. When startup was done changed remote to true in the problem model. I now stopped ferret drb server. On the stop cli command the drb server started building the index of the problem model. Not sure if it is related but a bit strange I thought. :-) Izit Izit wrote:> cli command outputs: > > /usr/lib/ruby/1.8/drb/drb.rb:736:in `open'': druby://localhost:9010 - > #<Errno::ECONNREFUSED: Connection refused - connect(2)> > (DRb::DRbConnError) > from /usr/lib/ruby/1.8/drb/drb.rb:729:in `each'' > from /usr/lib/ruby/1.8/drb/drb.rb:729:in `open'' > from /usr/lib/ruby/1.8/drb/drb.rb:1189:in `initialize'' > from /usr/lib/ruby/1.8/drb/drb.rb:1169:in `new'' > from /usr/lib/ruby/1.8/drb/drb.rb:1169:in `open'' > from /usr/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'' > from /usr/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'' > from /usr/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'' > ... 30 levels... > from > /usr/lib64/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:39 > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' > from script/runner:3 > > > Jens Kraemer wrote: >> On Thu, Jul 26, 2007 at 09:14:36AM +0200, Izit Izit wrote: >>> The same problem is back again. I moved my development app to production >>> (dev = OS X, prod = Linux). started drb server and same problem occurs >>> again. >> >> So what does the DRb server log when it''s started? >> >> Jens >> -- >> Jens Kr?mer >> http://www.jkraemer.net/ - Blog >> http://www.omdb.org/ - The new free film database-- Posted via http://www.ruby-forum.com/.
Maybe this is a way to the solution: Observers. for my problem model ''Mutation'' I also have configured an observer. With the observer defined and remote set to true in the model, DRB server does not start. If I remove the observer statement, the DRB server starts without a problem. This may also explain why mongrel has the AAF log messages during startup because it is accessing the Model because of the observer statement. Not sure how to fix it though. Izit Izit wrote:> Some experimenting: > > In my problem model I put remote to false. Started ferret drb server. > When startup was done changed remote to true in the problem model. I now > stopped ferret drb server. On the stop cli command the drb server > started building the index of the problem model. > > Not sure if it is related but a bit strange I thought. :-) > > Izit Izit wrote: >> cli command outputs: >> >> /usr/lib/ruby/1.8/drb/drb.rb:736:in `open'': druby://localhost:9010 - >> #<Errno::ECONNREFUSED: Connection refused - connect(2)> >> (DRb::DRbConnError) >> from /usr/lib/ruby/1.8/drb/drb.rb:729:in `each'' >> from /usr/lib/ruby/1.8/drb/drb.rb:729:in `open'' >> from /usr/lib/ruby/1.8/drb/drb.rb:1189:in `initialize'' >> from /usr/lib/ruby/1.8/drb/drb.rb:1169:in `new'' >> from /usr/lib/ruby/1.8/drb/drb.rb:1169:in `open'' >> from /usr/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'' >> from /usr/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'' >> from /usr/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'' >> ... 30 levels... >> from >> /usr/lib64/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:39 >> from >> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in >> `gem_original_require'' >> from >> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' >> from script/runner:3 >> >> >> Jens Kraemer wrote: >>> On Thu, Jul 26, 2007 at 09:14:36AM +0200, Izit Izit wrote: >>>> The same problem is back again. I moved my development app to production >>>> (dev = OS X, prod = Linux). started drb server and same problem occurs >>>> again. >>> >>> So what does the DRb server log when it''s started? >>> >>> Jens >>> -- >>> Jens Kr?mer >>> http://www.jkraemer.net/ - Blog >>> http://www.omdb.org/ - The new free film database-- Posted via http://www.ruby-forum.com/.
On Thu, Jul 26, 2007 at 09:57:32AM +0200, Izit Izit wrote:> Maybe this is a way to the solution: Observers. > > for my problem model ''Mutation'' I also have configured an observer. With > the observer defined and remote set to true in the model, DRB server > does not start. If I remove the observer statement, the DRB server > starts without a problem. > > This may also explain why mongrel has the AAF log messages during > startup because it is accessing the Model because of the observer > statement.Yeah this problem is known - when the model gets loaded during rails startup (the DRb server runs in a full Rails environment) and therefore before the server itself is started, aaf inside the model has no way to know it is running inside the server and so tries to connect to the server which of course isn''t there yet. However recent aaf (0.4.1 or trunk) should not have this problem, it uses an environment variable set in script/ferret_start to tell aaf it shouldn''t try to connect to DRb. 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
I got it working now but starting the DRB server as follows: FERRET_USE_LOCAL_INDEX=1 RAILS_ENV=production script/ferret_start> > Yeah this problem is known - when the model gets loaded during rails > startup (the DRb server runs in a full Rails environment) and therefore > before the server itself is started, aaf inside the model has no way to > know it is running inside the server and so tries to connect to the > server which of course isn''t there yet. However recent aaf (0.4.1 or > trunk) should not have this problem, it uses an environment variable set > in script/ferret_start to tell aaf it shouldn''t try to connect to DRb. > > 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 > kraemer at webit.de | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold, Hagen Malessa-- Posted via http://www.ruby-forum.com/.
On Thu, Jul 26, 2007 at 10:31:17AM +0200, Izit Izit wrote:> I got it working now but starting the DRB server as follows: > > FERRET_USE_LOCAL_INDEX=1 RAILS_ENV=production script/ferret_startyep, and that''s exactly what recent versions of the ferret_start script do: ENV[''FERRET_USE_LOCAL_INDEX''] = ''true'' require File.dirname(__FILE__) + ''/../config/boot'' require RAILS_ROOT + ''/config/environment'' ... Are you sure you have that first line in your ferret_start script? Jens -- Jens Kr?mer http://www.jkraemer.net/ - Blog http://www.omdb.org/ - The new free film database
The ferret_start in RAILS_ROOT/script directory does not have those lines but the vendor/plugin/acts_as_ferret/script/ferret_start does. I have done a fresh svn install of the plugin this morning. Jens Kraemer wrote:> On Thu, Jul 26, 2007 at 10:31:17AM +0200, Izit Izit wrote: >> I got it working now but starting the DRB server as follows: >> >> FERRET_USE_LOCAL_INDEX=1 RAILS_ENV=production script/ferret_start > > yep, and that''s exactly what recent versions of the ferret_start script > do: > > ENV[''FERRET_USE_LOCAL_INDEX''] = ''true'' > require File.dirname(__FILE__) + ''/../config/boot'' > require RAILS_ROOT + ''/config/environment'' > ... > > Are you sure you have that first line in your ferret_start script? > > Jens > > > -- > Jens Kr?mer > http://www.jkraemer.net/ - Blog > http://www.omdb.org/ - The new free film database-- Posted via http://www.ruby-forum.com/.
On Thu, Jul 26, 2007 at 10:49:37AM +0200, Izit Izit wrote:> The ferret_start in RAILS_ROOT/script directory does not have those > lines but the vendor/plugin/acts_as_ferret/script/ferret_start does. > > I have done a fresh svn install of the plugin this morning.hm, svn install is supposed to copy those files from vendor/plugin/acts_as_ferret/script/ to script/. Might be that it fails if the target file already exists - I''ll fix that so a warning is issued in this case. Or maybe permissions on script/ferret_start just didn''t allow overwriting it? 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
permissions are ok. thanks for all the help Jens Kraemer wrote:> On Thu, Jul 26, 2007 at 10:49:37AM +0200, Izit Izit wrote: >> The ferret_start in RAILS_ROOT/script directory does not have those >> lines but the vendor/plugin/acts_as_ferret/script/ferret_start does. >> >> I have done a fresh svn install of the plugin this morning. > > hm, svn install is supposed to copy those files from > vendor/plugin/acts_as_ferret/script/ to script/. Might be that it fails > if the target file already exists - I''ll fix that so a warning is issued > in this case. Or maybe permissions on script/ferret_start just didn''t > allow overwriting it? > > 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 > kraemer at webit.de | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold, Hagen Malessa-- Posted via http://www.ruby-forum.com/.