pat / ts-delayed-delta

Manage delta indexes via Delayed Job for Thinking Sphinx
http://ts.freelancing-gods.com
MIT License
73 stars 33 forks source link

private method `warn' called for nil:NilClass #17

Closed phuwanart closed 12 years ago

phuwanart commented 12 years ago

My config is

# Gemfile
gem 'delayed_job'
gem 'thinking-sphinx'
gem 'ts-delayed-delta', :require => 'thinking_sphinx/deltas/delayed_delta'

# Rakefile
require 'thinking_sphinx/deltas/delayed_delta/tasks'

# config/environment.rb
ThinkingSphinx.suppress_delta_output = true

# define index in model
define_index do
    indexes title

    # Set Delta Indexes
    set_property :delta => true
    set_property :delta => :delayed
end

and error is

$ rake ts:index --trace
rake aborted!
private method `warn' called for nil:NilClass
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/named_scope.rb:194:in `valid_scope_name?'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/named_scope.rb:175:in `scope'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/kaminari-0.12.4/lib/kaminari/models/active_record_extension.rb:15:in `block in inherited'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/kaminari-0.12.4/lib/kaminari/models/active_record_extension.rb:10:in `class_eval'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/kaminari-0.12.4/lib/kaminari/models/active_record_extension.rb:10:in `inherited'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/ts-delayed-delta-1.1.2/lib/thinking_sphinx/deltas/delayed_delta/job.rb:16:in `<top (required)>'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/ts-delayed-delta-1.1.2/lib/thinking_sphinx/deltas/delayed_delta.rb:6:in `<top (required)>'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
/Users/phuwanart/Works/user_mw3/config/application.rb:7:in `<top (required)>'
/Users/phuwanart/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/phuwanart/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/phuwanart/Works/user_mw3/Rakefile:5:in `<top (required)>'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Users/phuwanart/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'

please suggest me to fix this problem.

pat commented 12 years ago

Which version of Delayed Job are you using?

phuwanart commented 12 years ago

I use delayed_job (2.1.4).

pat commented 12 years ago

Is delayed_job listed in your Gemfile before ts-delayed-delta? Not really sure what the cause of this could be... but it's happening when ts-delayed-delta refers to a delayed_job class...

phuwanart commented 12 years ago

Thank you about suggestion, I can fix this problem.

pat commented 12 years ago

How did you fix it? It'd be useful to know in case others come across the same issue.

phuwanart commented 12 years ago

First, I need forgiveness because I do not use the word 'fix' for this problem. I just made 'bundle update' only. I was wrong, that does not look good. Your guide helped me. I missed it because 'gem list' was found to be 'delayed_job (2.1.4)' was confusing. However, thanks.