I've got it working now. Specifying the environment when running the rake task seemed to do the trick:
rake ts:rebuild RAILS_ENV=development It looks like Defensio needed to have the RAILS_ENV specified in order to get going. On Sep 7, 11:17 am, Benjamin Lim <[email protected]> wrote: > Here's the output: > > Warning: Error loading /Users/blim/workspace/foo/app/models/ > picture_post.rb: > can't convert nil into Hash > /Users/blim/workspace/foo/vendor/plugins/defensio/lib/defensio/ > acts_as.rb:95:in `merge!' > /Users/blim/workspace/foo/vendor/plugins/defensio/lib/defensio/ > acts_as.rb:95:in `defensio_options=' > /Users/blim/workspace/foo/vendor/plugins/defensio/lib/defensio/ > acts_as.rb:75:in `acts_as_defensio' > /Users/blim/workspace/foo/vendor/plugins/defensio/lib/defensio/ > acts_as.rb:35:in `acts_as_defensio_article' > /Users/blim/workspace/foo/app/models/post.rb:15 > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:380:in > `load_without_new_constant_marking' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:380:in `load_file' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:521:in `new_constants_in' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:379:in `load_file' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:259:in `require_or_load' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:425:in `load_missing_constant' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:80:in > `const_missing_not_from_s3_library' > /Users/blim/workspace/foo/vendor/gems/aws-s3-0.6.2/lib/aws/s3/ > extensions.rb:206:in `const_missing' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:92:in `const_missing' > /Users/blim/workspace/foo/app/models/picture_post.rb:1 > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:380:in > `load_without_new_constant_marking' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:380:in `load_file' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:521:in `new_constants_in' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:379:in `load_file' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:259:in `require_or_load' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:425:in `load_missing_constant' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:80:in > `const_missing_not_from_s3_library' > /Users/blim/workspace/foo/vendor/gems/aws-s3-0.6.2/lib/aws/s3/ > extensions.rb:206:in `const_missing' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/dependencies.rb:92:in `const_missing' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/inflector.rb:364:in `constantize' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/inflector.rb:363:in `each' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/inflector.rb:363:in `constantize' > /Users/blim/workspace/foo/vendor/rails/activesupport/lib/ > active_support/core_ext/string/inflections.rb:162:in `constantize' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/context.rb:63:in `load_models' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/context.rb:54:in `each' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/context.rb:54:in `load_models' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/context.rb:53:in `each' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/context.rb:53:in `load_models' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/context.rb:15:in `prepare' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx.rb:74:in `context' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx.rb:71:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx.rb:71:in `context' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/configuration.rb:151:in `build' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/tasks.rb:69 > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in > `execute' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in > `execute' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in > `invoke_with_call_chain' > /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_call_chain' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in > `invoke' > /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ > thinking_sphinx/tasks.rb:86 > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in > `execute' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in > `execute' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in > `invoke_with_call_chain' > /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_call_chain' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in > `invoke_prerequisites' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in > `invoke_prerequisites' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in > `invoke_with_call_chain' > /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_call_chain' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in > `invoke' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in > `invoke_task' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `top_level' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `each' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `top_level' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > `standard_exception_handling' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in > `top_level' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > `standard_exception_handling' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 > /usr/local/bin/rake:19:in `load' > /usr/local/bin/rake:19 > > On Sep 4, 10:08 am, "Pat Allan" <[email protected]> wrote: > > > Hi Benjamin > > > I'm at a bit of a loss why this is happening, so I've added some extra > > debugging lines to Thinking Sphinx - if you could either grab the > > source, run 'rake build', and use the locally built gem, or just edit > > your local gem to match, that should give us some more clues as to why > > TS is struggling to load these subclasses. > > >http://github.com/freelancing-god/thinking-sphinx/commit/101e4edfa7a2... > > > Cheers > > > -- > > Pat > > > On 9/3/2010, "Benjamin Lim" <[email protected]> wrote: > > > >Referencing those subclasses from script/console works perfectly fine. > > > >The application is running on: > > >Ruby 1.8.7 (2009-06-12 patchlevel 174) > > >Rails 2.3.8 > > >Thinking Sphinx 1.3.18 > > >Sphinx 0.9.9-release (r2117) > > > >thanks > > > >On Sep 3, 5:48 am, Pat Allan <[email protected]> wrote: > > >> What happens when you fire up script/console and reference on of those > > >> subclasses? Eg: > > > >> QuotePost > > > >> Also, what versions of Rails, Sphinx and Thinking Sphinx are you using? > > > >> Cheers > > > >> -- > > >> Pat > > > >> On 03/09/2010, at 5:54 AM, Benjamin Lim <[email protected]> wrote: > > > >> > I'm getting the following message when I try to reindex my > > >> > application: > > > >> > Warning: Error loading /foo/app/models/picture_post.rb > > >> > Warning: Error loading /foo/app/models/post_comment.rb > > >> > Warning: Error loading /foo/app/models/quote_post.rb > > >> > Warning: Error loading /foo/app/models/text_post.rb > > >> > Warning: Error loading /foo/app/models/video_post.rb > > > >> > All of those models are subclasses of the Post model which is where > > >> > I've put my define_index method. > > > >> > All the other indexes on the site that I've defined are working > > >> > correctly but the post index isn't being created and I'm assuming it > > >> > has something to do with the errors I've pasted above. > > > >> > Any help with this would be really appreciated. Thanks. > > > >> > -- > > >> > 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 > > >> > athttp://groups.google.com/group/thinking-sphinx?hl=en > > >> > . > > > >-- > > >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 > > >athttp://groups.google.com/group/thinking-sphinx?hl=en. -- 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.
