search for: class_methods

Displaying 20 results from an estimated 53 matches for "class_methods".

2007 Dec 21
5
Mocha and rails 2.0.2?
Folks- With Rails 2.0.2, I''m seeing mocha failures where they did not fail with Rails 2.0.1 test_set_to_process_fail_in_transaction(FileRecordTest): NoMethodError: undefined method `ord'' for 63:Fixnum /home/wolpert/svn/rubylms/vendor/plugins/mocha/lib/mocha/class_method.rb:45:in `hidden_method''
2007 Mar 21
2
store_class_name for Comatose:Page model
...i, I have three models: Comatose::Page, Article and Product. In all of them, store_class_name is set to true. Now, when i do: results = Comatose::Page.multi_search("*", [Article,Product], options) I get: wrong constant name Comatose::Page #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:438:in `const_get'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:438:in `multi_search'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:460:in `id_multi_search'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/multi_index.rb:28:in `sea...
2006 Oct 09
7
multi_search problems, Never go away!
Hello, I am trying to use the multi_search method, but I keep getting type error on nil objects, I send it [Model1,Model2] and it seems as though the class names keep getting clobbered and turn to nil, somewhere along the multi_index area. I tried to trace what was going on, but I got nothing, also, this only happens when there are actually hits(thank god, most of the time). Perhaps some insight?
2007 Mar 25
1
kind of stuck with new version of ferret gem
.... #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:201:in `send'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:201:in `rebuild_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:198:in `rebuild_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:197:in `rebuil...
2007 Jul 04
2
problems after gem update
...'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.0/lib/local_index.rb:23:in `ensure_index_exists'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.0/lib/local_index.rb:9:in `initialize'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.0/lib/class_methods.rb:233:in `new'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.0/lib/class_methods.rb:233:in `create_index_instance'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.0/lib/class_methods.rb:25:in `aaf_index'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/act...
2007 Mar 27
1
multi_search problems
...If I do @results = Post.find_by_contents(params[:q]) or @results = Page.find_by_contents(params[:q]) it works fine, but if I try to search in both models @results = Page.multi_search(params[:q],[Post]) I get the following error: nil is not a symbol #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:438:in `const_get'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:438:in `multi_search'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:460:in `id_multi_search'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/multi_index.rb:28:in `sea...
2006 Nov 06
1
NameError uninitialized constant Ferret::Index::FieldInfos
...ript/../config/.. Application Trace | Framework Trace | Full Trace vendor/rails/activesupport/lib/active_support/dependencies.rb:260:in `load_missing_constant'' vendor/rails/activesupport/lib/active_support/dependencies.rb:431:in `const_missing'' vendor/plugins/acts_as_ferret/lib/class_methods.rb:170:in `rebuild_index'' vendor/plugins/acts_as_ferret/lib/class_methods.rb:223:in `create_index_instance'' vendor/plugins/acts_as_ferret/lib/class_methods.rb:216:in `ferret_index'' vendor/plugins/acts_as_ferret/lib/class_methods.rb:381:in `find_id_by_contents''...
2006 Oct 03
4
newbie question
...e=>:no, :boost=>1.0, :index=>:yes}:Hash RAILS_ROOT: /Users/chrisc/Documents/checkouts/PROS/config/.. Application Trace | Framework Trace | Full Trace /opt/local/lib/ruby/site_ruby/1.8/ferret/index/field_infos.rb:20:in `initialize'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:166:in `rebuild_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:230:in `create_index_instance'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:223:in `ferret_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_method...
2006 Oct 03
4
newbie question
...e=>:no, :boost=>1.0, :index=>:yes}:Hash RAILS_ROOT: /Users/chrisc/Documents/checkouts/PROS/config/.. Application Trace | Framework Trace | Full Trace /opt/local/lib/ruby/site_ruby/1.8/ferret/index/field_infos.rb:20:in `initialize'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:166:in `rebuild_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:230:in `create_index_instance'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:223:in `ferret_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_method...
2006 Feb 16
10
Confused over Model attrbutes and @ prefix
I''m confused about how attributes work in models. For example: class Page < ActiveRecord::Base attr_accessor :body def foo id # works @id # won''t work IIRC body # won''t work @body #works end end Why doesn''t everything work the same? Joe -- Posted via http://www.ruby-forum.com/.
2007 Jun 01
2
Is aaf multi_search broken?
...sults = Reviewable.multi_search("jemen", [Blog]) and I''m always getting the error You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.map #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:131:in `id_multi_search'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:113:in `multi_search'' #{RAILS_ROOT}/app/controllers/search_controller.rb:53:in `search'' I have configured indexing like this: acts_as_ferret :fields => [:index_text, :index_l...
2006 Nov 07
1
Memory consumption too high
Hi, I''m having trouble with ferret and AAF blowing up with a NoMemoryError. Sometimes when I add documents inside my rails app. Ferret starts consuming huge amounts of memory. I''m on a machine with 2GB of memory and it still runs out of memory. Sometimes I''m able to run MyObject.rebuild_index and the memory doesn''t move up at all. However, sometimes it
2007 Apr 18
1
stack level too deep for method missing when using drb
...druby://localhost:9010) /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' (druby://localhost:9010) script/runner:3 #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/remote_index.rb:20:in `find_id_by_contents'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:82:in `find_id_by_contents'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:134:in `ar_find_by_contents'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:128:in `find_records_lazy_or_not'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/...
2007 Jan 21
14
[ActsAsFerret] OpenSolaris (TextDrive) indexing issues
...t/index.rb:273:in `<<'' from /opt/csw/lib/ruby/1.8/monitor.rb:229:in `synchronize'' from /opt/csw/lib/ruby/gems/1.8/gems/ferret-0.10.14/lib/ferret/index.rb:256:in `<<'' from ./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:199:in `rebuild_index'' from ./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:198:in `rebuild_index'' from ./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:197:in `rebuild_index''...
2007 Apr 01
2
strange behavior after switching to DRb server
...druby://localhost:9010) script/runner:3:in `eval'' (druby://localhost:9010) ./vendor/rails/railties/lib/commands/ runner.rb:45 (druby://localhost:9010) script/runner:3 vendor/plugins/acts_as_ferret/lib/remote_index.rb:20:in `find_id_by_contents'' vendor/plugins/acts_as_ferret/lib/class_methods.rb:82:in `find_id_by_contents'' vendor/plugins/acts_as_ferret/lib/class_methods.rb:134:in `ar_find_by_contents'' vendor/plugins/acts_as_ferret/lib/class_methods.rb:128:in `find_records_lazy_or_not'' vendor/plugins/acts_as_ferret/lib/class_methods.rb:54:in `find_by_co...
2006 Oct 12
3
IO Error occured at <except.c>:79 in xraise (IOError)
...t/index.rb:536:in `optimize'' from /usr/local/ruby-1.8.5/lib/ruby/1.8/monitor.rb:238:in `synchronize'' from /usr/local/ruby-1.8.5/lib/ruby/gems/1.8/gems/ferret-0.10.11/lib/ferret/index.rb:534:in `optimize'' from ./vendor/plugins/acts_as_ferret/lib/class_methods.rb:235:in `manual_index_update'' from (eval):1 from /usr/local/ruby-1.8.5/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `eval'' from /usr/local/ruby-1.8.5/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/runner.rb:27 from /usr/local/ruby...
2006 Nov 28
4
Update/Create record only if field is true
I have a sellable flag in my database. I''m trying to have ferret only add/update records where sellable == true. What is the best way to do this? I''ve tried editing instance_methods.rb in the AAF, but I still can''t get it to work. Thanks for the help -- Posted via http://www.ruby-forum.com/.
2007 Mar 28
7
Newbie problem on production server
.../usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'' /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:657:in `process_query'' /vendor/plugins/acts_as_ferret/lib/local_index.rb:87:in `find_id_by_contents'' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:82:in `find_id_by_contents'' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:134:in `ar_find_by_contents'' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:128:in `find_records_lazy_or_not'' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:54:in `fin...
2007 Oct 03
3
Pagination problem with acts_as_ferret
Hi, am using this wonderful plugin acts_as_ferret and according to the tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic I worked it out except the pagination feature. If I have 12 records and I give limit to 10, its correctly displaying 10 records in the first page and is giving the link to the second page too. But when I go to the next page I find the same 10 records instead of
2007 Sep 28
4
undefined method error
...ot;, :phone_day=>""}]) Over and over again. But more importantly, since yesterday doing a search has caused an exception: A NoMethodError occurred in partners#user_search: undefined method `each'' for :sales_region:Symbol [RAILS_ROOT]/vendor/plugins/acts_as_ferret/lib/class_methods.rb:246:in `retrieve_records'' Any idea what these could have been caused by? Thanks, Chris. -- Posted via http://www.ruby-forum.com/.