Sinatra rake fs:start issue
Hi again,
I finally got 'rake fs:index' to work but 'fs:start' and 'fs:rebuild' both throw this error:
rake aborted!
undefined method `present?' for nil:NilClass
/app/.bundle/gems/ruby/1.9.1/gems/flying-sphinx-0.5.1/lib/flying_sphinx/api.rb:77:in `log?'
/app/.bundle/gems/ruby/1.9.1/gems/flying-sphinx-0.5.1/lib/flying_sphinx/api.rb:68:in `log'
/app/.bundle/gems/ruby/1.9.1/gems/flying-sphinx-0.5.1/lib/flying_sphinx/api.rb:27:in `post'
/app/.bundle/gems/ruby/1.9.1/gems/flying-sphinx-0.5.1/lib/flying_sphinx/configuration.rb:24:in `start_sphinx'
/app/.bundle/gems/ruby/1.9.1/gems/flying-sphinx-0.5.1/lib/flying_sphinx/tasks.rb:13:in `block (2 levels) in <top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1992:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
It looks like it's not finding ENV['VERBOSE_LOGGING'].
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Pat Allan on 20 Jul, 2011 09:31 AM
Ah, I guess ActiveSupport isn't adding all the extensions in automatically.
Can you add this require statement to your Rakefile, after the Bundler setup? I'll fix things up in flying-sphinx, but this is a quick fix to check that it works:
2 Posted by Yuki on 20 Jul, 2011 09:46 AM
It works :)
By the way, if you don't mind answering: how does FS know what database my ActiveRecord model is linked to?
Support Staff 3 Posted by Pat Allan on 20 Jul, 2011 10:04 AM
Good to know - although I'll just remove the
present?
call - if it's not nil, then it's fine,Flying Sphinx (and Thinking Sphinx) look at the underlying database connection for the model, and pass those details (database, host, port, username, password) through to the sphinx configuration.
Pat Allan closed this discussion on 23 Aug, 2011 11:21 PM.