It works ! Thank you, I would never have thought !!
so acts_as_indexed and Sphinx wont work together ? Greets Christian On 4 Okt., 13:11, Pat Allan <[email protected]> wrote: > What happens if you remove the acts_as_indexed lines? > > -- > Pat > > On 04/10/2010, at 10:09 PM, Christian Kai wrote: > > > Ive written 2 own Models, and both dont work, here are the Sources: > > > class Realestate < ActiveRecord::Base > > > acts_as_indexed :fields => > > [:city, :state, :location, :title, :condition, :description, :contracttype] > > > validates_presence_of :title > > validates_uniqueness_of :title > > > has_many :pictures, :class_name => 'Image' > > belongs_to :subcategory > > belongs_to :category > > > accepts_nested_attributes_for :subcategory > > accepts_nested_attributes_for :category > > > define_index do > > indexes title > > > has created_at, updated_at > > end > > end > > > _______________________________________________ > > > class Category < ActiveRecord::Base > > > acts_as_indexed :fields => [:name, :parent] > > > validates_presence_of :name > > validates_uniqueness_of :name > > belongs_to :image, :class_name => 'Image' > > has_many :subcategories > > has_many :realestates > > > define_index do > > indexes name > > > has created_at, updated_at > > end > > end > > > --------- > > Christian > > > On 4 Okt., 12:32, Pat Allan <[email protected]> wrote: > >> Hi Christian > > >> I'm wondering if RefineryCMS already has a method in whichever model > >> you're dealing with called update_index... although the error is on the > >> method definition, which is odd. > > >> Have you written the model in question? Or is it from RefineryCMS? If you > >> wrote it, can you share the code of that model? > > >> Cheers > > >> -- > >> Pat > > >> On 03/10/2010, at 1:50 AM, Christian Kai wrote: > > >>> Hi Pat, > > >>> here the Full Trace > >>> thinking-sphinx (2.0.0.rc2) lib/thinking_sphinx/active_record/ > >>> attribute_updates.rb:42:in `update_index' > >>> activesupport (3.0.0) lib/active_support/callbacks.rb:414:in > >>> `_run_update_callbacks' > >>> activerecord (3.0.0) lib/active_record/callbacks.rb:285:in `update' > >>> activerecord (3.0.0) lib/active_record/persistence.rb:247:in > >>> `create_or_update' > >>> activerecord (3.0.0) lib/active_record/callbacks.rb:277:in `block in > >>> create_or_update' > >>> activesupport (3.0.0) lib/active_support/callbacks.rb:423:in > >>> `_run_save_callbacks' > >>> activerecord (3.0.0) lib/active_record/callbacks.rb:277:in > >>> `create_or_update' > >>> activerecord (3.0.0) lib/active_record/persistence.rb:39:in `save' > >>> activerecord (3.0.0) lib/active_record/validations.rb:43:in `save' > >>> activerecord (3.0.0) lib/active_record/attribute_methods/dirty.rb: > >>> 21:in `save' > >>> activerecord (3.0.0) lib/active_record/transactions.rb:237:in `block > >>> (2 levels) in save' > >>> activerecord (3.0.0) lib/active_record/transactions.rb:289:in `block > >>> in with_transaction_returning_status' > >>> activerecord (3.0.0) lib/active_record/connection_adapters/abstract/ > >>> database_statements.rb:139:in `transaction' > >>> activerecord (3.0.0) lib/active_record/transactions.rb:204:in > >>> `transaction' > >>> activerecord (3.0.0) lib/active_record/transactions.rb:287:in > >>> `with_transaction_returning_status' > >>> activerecord (3.0.0) lib/active_record/transactions.rb:237:in `block > >>> in save' > >>> activerecord (3.0.0) lib/active_record/transactions.rb:248:in > >>> `rollback_active_record_state!' > >>> activerecord (3.0.0) lib/active_record/transactions.rb:236:in `save' > >>> vendor/engines/subcategories/app/controllers/admin/ > >>> subcategories_controller.rb:19:in `create' > >>> actionpack (3.0.0) lib/action_controller/metal/implicit_render.rb:4:in > >>> `send_action' > >>> actionpack (3.0.0) lib/abstract_controller/base.rb:150:in > >>> `process_action' > >>> actionpack (3.0.0) lib/action_controller/metal/rendering.rb:11:in > >>> `process_action' > >>> actionpack (3.0.0) lib/abstract_controller/callbacks.rb:18:in `block > >>> in process_action' > >>> activesupport (3.0.0) lib/active_support/callbacks.rb:475:in > >>> `_run__320293795__process_action__171546687__callbacks' > >>> activesupport (3.0.0) lib/active_support/callbacks.rb:409:in > >>> `_run_process_action_callbacks' > >>> activesupport (3.0.0) lib/active_support/callbacks.rb:93:in > >>> `run_callbacks' > >>> actionpack (3.0.0) lib/abstract_controller/callbacks.rb:17:in > >>> `process_action' > >>> actionpack (3.0.0) lib/action_controller/metal/instrumentation.rb: > >>> 30:in `block in process_action' > >>> activesupport (3.0.0) lib/active_support/notifications.rb:52:in `block > >>> in instrument' > >>> activesupport (3.0.0) lib/active_support/notifications/instrumenter.rb: > >>> 21:in `instrument' > >>> activesupport (3.0.0) lib/active_support/notifications.rb:52:in > >>> `instrument' > >>> actionpack (3.0.0) lib/action_controller/metal/instrumentation.rb: > >>> 29:in `process_action' > >>> actionpack (3.0.0) lib/action_controller/metal/rescue.rb:17:in > >>> `process_action' > >>> actionpack (3.0.0) lib/abstract_controller/base.rb:119:in `process' > >>> actionpack (3.0.0) lib/abstract_controller/rendering.rb:40:in > >>> `process' > >>> actionpack (3.0.0) lib/action_controller/metal.rb:133:in `dispatch' > >>> actionpack (3.0.0) lib/action_controller/metal/rack_delegation.rb: > >>> 14:in `dispatch' > >>> actionpack (3.0.0) lib/action_controller/metal.rb:173:in `block in > >>> action' > >>> actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:62:in > >>> `call' > >>> actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:62:in > >>> `dispatch' > >>> actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:27:in > >>> `call' > >>> rack-mount (0.6.13) lib/rack/mount/route_set.rb:148:in `block in call' > >>> routing-filter (0.1.6) lib/routing_filter/adapters/rails_3.rb:64:in > >>> `call' > >>> routing-filter (0.1.6) lib/routing_filter/adapters/rails_3.rb:64:in > >>> `recognize_with_filtering' > >>> rack-mount (0.6.13) lib/rack/mount/route_set.rb:139:in `call' > >>> actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:492:in > >>> `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/ > >>> best_standards_support.rb:17:in `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/head.rb:14:in `call' > >>> rack (1.2.1) lib/rack/methodoverride.rb:24:in `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/params_parser.rb: > >>> 21:in `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/flash.rb:182:in > >>> `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/session/ > >>> abstract_store.rb:149:in `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/cookies.rb:287:in > >>> `call' > >>> activerecord (3.0.0) lib/active_record/query_cache.rb:32:in `block in > >>> call' > >>> activerecord (3.0.0) lib/active_record/connection_adapters/abstract/ > >>> query_cache.rb:28:in `cache' > >>> activerecord (3.0.0) lib/active_record/query_cache.rb:12:in `cache' > >>> activerecord (3.0.0) lib/active_record/query_cache.rb:31:in `call' > >>> activerecord (3.0.0) lib/active_record/connection_adapters/abstract/ > >>> connection_pool.rb:355:in `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/callbacks.rb:46:in > >>> `block in call' > >>> activesupport (3.0.0) lib/active_support/callbacks.rb:415:in > >>> `_run_call_callbacks' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/callbacks.rb:44:in > >>> `call' > >>> rack (1.2.1) lib/rack/sendfile.rb:107:in `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/remote_ip.rb:48:in > >>> `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/show_exceptions.rb: > >>> 46:in `call' > >>> railties (3.0.0) lib/rails/rack/logger.rb:13:in `call' > >>> rack (1.2.1) lib/rack/runtime.rb:17:in `call' > >>> activesupport (3.0.0) lib/active_support/cache/strategy/local_cache.rb: > >>> 72:in `call' > >>> dragonfly (0.7.6) lib/dragonfly/middleware.rb:16:in `call' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:129:in `forward' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:136:in `pass' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:148:in `invalidate' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:70:in `call!' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:50:in `call' > >>> dragonfly (0.7.6) lib/dragonfly/middleware.rb:16:in `call' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:129:in `forward' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:136:in `pass' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:148:in `invalidate' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:70:in `call!' > >>> rack-cache (0.5.3) lib/rack/cache/context.rb:50:in `call' > >>> rack (1.2.1) lib/rack/lock.rb:11:in `block in call' > >>> <internal:prelude>:10:in `synchronize' > >>> rack (1.2.1) lib/rack/lock.rb:11:in `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/static.rb:30:in > >>> `call' > >>> actionpack (3.0.0) lib/action_dispatch/middleware/static.rb:30:in > >>> `call' > >>> railties (3.0.0) lib/rails/application.rb:168:in `call' > >>> railties (3.0.0) lib/rails/application.rb:77:in `method_missing' > >>> railties (3.0.0) lib/rails/rack/log_tailer.rb:14:in `call' > >>> rack (1.2.1) lib/rack/content_length.rb:13:in `call' > >>> rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service' > >>> /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' > >>> /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' > >>> /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in > >>> start_thread' > > >>> On 2 Okt., 16:25, Pat Allan <[email protected]> wrote: > >>>> Hi Christian > > >>>> What's the full stack trace of the error? > > >>>> -- > >>>> Pat > > >>>> On 02/10/2010, at 10:37 PM, Christian Kai wrote: > > >>>>> Hallo, > > >>>>> i am using refinerycms and Thinking Sphinx, > >>>>> searching and starting TS Server is ok, > >>>>> but when i call Model.Create theres the following error. > > >>>>> Whithout TS my app works fine. > > >>>>> I dont know how to solve the Problem, i searched the web for this > >>>>> failure, without success. > >>>>> I read that i could set up TS with other Model folders as follow > >>>>> and I have this line in my enviroment.rb > >>>>> ThinkingSphinx::Configuration.instance.model_directories << "/Vendor/ > >>>>> engines/*/app/models" > > >>>>> could this solve my Problem ? > > >>>>> ArgumentError in Admin/subcategoriesController#create > > >>>>> wrong > > ... > > Erfahren Sie mehr » -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
