Harman Sandjaja
2007-Mar-31 01:16 UTC
[Ferret-talk] Problem with setting up remote indexing
Hello, I have been trying to set up the remote indexing for acts_as_ferret and followed the guide here: http://projects.jkraemer.net/acts_as_ferret/wiki/DrbServer I added :remote => true to my models and then specified host and port for the production environment. After defining the host/port for production, I tried to run my development server and received the following error: vendor/plugins/acts_as_ferret/lib/act_methods.rb:66:in `acts_as_ferret'': You have a nil object when you didn''t expect it! (NoMethodError) You might have expected an instance of Array. Isn''t it supposed to work just fine even though we don''t specify neither the development nor the test environment in the ferret_server.yml? Anyways, I then decided to specify development environment in the ferret_server.yml Here is how it''s setup: development: host: localhost port: 3000 (my rails app port) Sure enough I don''t get that error anymore and my development server boots up just fine. However, when I executed my search it didn''t work (I use id_multi_search btw so need to add :store_class_name => true to my models as well). The following is the error description: DRb::DRbConnError (too large packet 1213486160): C:/ruby/lib/ruby/1.8/drb/drb.rb:573:in `load'' C:/ruby/lib/ruby/1.8/drb/drb.rb:632:in `recv_reply'' C:/ruby/lib/ruby/1.8/drb/drb.rb:921:in `recv_reply'' C:/ruby/lib/ruby/1.8/drb/drb.rb:1195:in `send_message'' C:/ruby/lib/ruby/1.8/drb/drb.rb:1086:in `method_missing'' C:/ruby/lib/ruby/1.8/drb/drb.rb:1170:in `open'' C:/ruby/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'' C:/ruby/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'' C:/ruby/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'' C:/work/myapp/vendor/plugins/acts_as_ferret/lib/remote_index.rb:25:in `id_multi_search'' C:/work/myapp/vendor/plugins/acts_as_ferret/lib/class_methods.rb:117:in `id_multi_search'' C:/work/myapp/lib/ferret_search.rb:73:in `quick_search'' ... Any clue guys? Thank you in advance for the help. -- Posted via http://www.ruby-forum.com/.
On Sat, Mar 31, 2007 at 03:16:04AM +0200, Harman Sandjaja wrote:> Hello, > > I have been trying to set up the remote indexing for acts_as_ferret and > followed the guide here: > http://projects.jkraemer.net/acts_as_ferret/wiki/DrbServer > I added :remote => true to my models and then specified host and port > for the production environment. > > After defining the host/port for production, I tried to run my > development server and received the following error: > vendor/plugins/acts_as_ferret/lib/act_methods.rb:66:in `acts_as_ferret'': > You have a nil object when you didn''t expect it! (NoMethodError) > You might have expected an instance of Array. > > Isn''t it supposed to work just fine even though we don''t specify neither > the development nor the test environment in the ferret_server.yml? > > Anyways, I then decided to specify development environment in the > ferret_server.yml > Here is how it''s setup: > development: > host: localhost > port: 3000 (my rails app port)I guess that''s the problem, this port is *not* the rails app port, but the port the DRb server will listen on. it needs to be a free, unused port on the machine where the DRb server should run. Also be sure to start the drb server with script/ferret_start . 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
Harman Sandjaja
2007-Mar-31 20:43 UTC
[Ferret-talk] Problem with setting up remote indexing
Thank you for the reply Jens! What I''m trying to do is to only use the DRb server in the production environment (not in development nor test). So I removed the development and test sections in the config/ferret_server.yml But I''m getting this error instead: vendor/plugins/acts_as_ferret/lib/act_methods.rb:66:in `acts_as_ferret'': You have a nil object when you didn''t expect it! (NoMethodError) You might have expected an instance of Array. Sorry for not being clear enough in my post earlier. -- Posted via http://www.ruby-forum.com/.
On Sat, Mar 31, 2007 at 10:43:12PM +0200, Harman Sandjaja wrote:> Thank you for the reply Jens! > > What I''m trying to do is to only use the DRb server in the production > environment (not in development nor test). > > So I removed the development and test sections in the > config/ferret_server.yml > > But I''m getting this error instead: > vendor/plugins/acts_as_ferret/lib/act_methods.rb:66:in `acts_as_ferret'': > You have a nil object when you didn''t expect it! (NoMethodError) > You might have expected an instance of Array. > > Sorry for not being clear enough in my post earlier.does changing the load method of ferret_server.rb (around line 18) to this help? # reads connection settings from config file def load(file = "#{RAILS_ROOT}/config/ferret_server.yml") config = DEFAULTS.merge(YAML.load(ERB.new(IO.read(file)).result)) if config = config[RAILS_ENV] config[:uri] = "druby://#{config[''host'']}:#{config[''port'']}" return config end return {} # add this line end 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
Harman Sandjaja
2007-Apr-01 19:49 UTC
[Ferret-talk] Problem with setting up remote indexing
Hi Jens,> does changing the load method of ferret_server.rb (around line 18) to > this help?Yes it does. Thank you so much for the help. Best regards, Harman -- Posted via http://www.ruby-forum.com/.
On Sun, Apr 01, 2007 at 09:49:34PM +0200, Harman Sandjaja wrote:> Hi Jens, > > > does changing the load method of ferret_server.rb (around line 18) to > > this help? > > Yes it does. Thank you so much for the help.ok, this is fixed now in trunk, too. 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
Harman Sandjaja
2007-Apr-02 18:56 UTC
[Ferret-talk] Problem with setting up remote indexing
> ok, this is fixed now in trunk, too.Yup I updated already. Thanks again! =) -- Posted via http://www.ruby-forum.com/.
Harman Sandjaja wrote:>> ok, this is fixed now in trunk, too. > > Yup I updated already. > > Thanks again! =)When will this be released? cheers -- Posted via http://www.ruby-forum.com/.
On Thu, Jul 05, 2007 at 10:45:25AM +0200, Levent wrote:> Harman Sandjaja wrote: > >> ok, this is fixed now in trunk, too. > > > > Yup I updated already. > > > > Thanks again! =) > > When will this be released?I hope to release 0.4.1 by sunday. 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