Top Level Namespace

Defined Under Namespace

Modules: ThinkingSphinx Classes: String

Instance Method Summary collapse

Instance Method Details

#sphinx_pidObject



140
141
142
# File 'lib/thinking_sphinx/tasks.rb', line 140

def sphinx_pid
  ThinkingSphinx.sphinx_pid
end

#sphinx_running?Boolean

Returns:

  • (Boolean)


144
145
146
# File 'lib/thinking_sphinx/tasks.rb', line 144

def sphinx_running?
  ThinkingSphinx.sphinx_running?
end

#system!(cmd) ⇒ Object

a fail-fast, hopefully helpful version of system



149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/thinking_sphinx/tasks.rb', line 149

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