Top Level Namespace

Defined Under Namespace

Modules: ThinkingSphinx Classes: String

Instance Method Summary collapse

Instance Method Details

#sphinx_pidObject



223
224
225
# File 'lib/thinking_sphinx/tasks.rb', line 223

def sphinx_pid
  ThinkingSphinx.sphinx_pid
end

#sphinx_running?Boolean

Returns:

  • (Boolean)


227
228
229
# File 'lib/thinking_sphinx/tasks.rb', line 227

def sphinx_running?
  ThinkingSphinx.sphinx_running?
end

#system!(cmd) ⇒ Object

a fail-fast, hopefully helpful version of system



232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/thinking_sphinx/tasks.rb', line 232

def system!(cmd)
  unless system(cmd)
    raise <<-SYSTEM_CALL_FAILED
The following command failed:
  #{cmd}

This could be caused by a PATH issue in the environment of cron/passenger/etc. Your current PATH:
  #{ENV['PATH']}
You can set the path to your indexer and searchd binaries using the bin_path property in config/sphinx.yml:
  production:
    bin_path: '/usr/local/bin'
SYSTEM_CALL_FAILED
  end
end