Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Deployment/Installation updates

* Have both gem and plugin references for Capistrano setup.
* Remove symlink section for Capistrano - should be using shared paths already, as documented on the same page.
* Adding begin/rescue block around Raketask require - ugly, but makes gems:install rake task work.
  • Loading branch information...
commit f37976670268fff55075d1b2a794493a5572a1a5 1 parent e0fa174
@pat pat authored
7 ts/en/deployment.textile
@@ -37,6 +37,9 @@ Deploying via Capistrano is simplified by the included recipe file that comes wi
The first step is to include the recipe in order to define the necessary tasks for us:
{%highlight ruby%}
+# If you're using Thinking Sphinx as a gem:
+require 'thinking_sphinx/deploy/capistrano'
+# If you're using Thinking Sphinx as a plugin:
require 'vendor/plugins/thinking-sphinx/recipes/thinking_sphinx'
@@ -52,10 +55,6 @@ task :after_update_code, :roles => [:app] do
-task :symlink_sphinx_indexes, :roles => [:app] do
- run "ln -nfs #{shared_path}/db/sphinx #{release_path}/db/sphinx"
The above makes sure we stop the Sphinx @searchd@ search daemon before we update the code. After the code is updated, we reconfigure Sphinx and then restart. We'll setup a @cron@ job next to keep the indexes up-to-date.
6 ts/en/installing_thinking_sphinx.textile
@@ -34,7 +34,11 @@ config.gem(
And one last thing: ensure the rake tasks are available by adding the following lines to your @Rakefile@:
{% highlight ruby %}
-require 'thinking_sphinx/tasks'
+ require 'thinking_sphinx/tasks'
+rescue LoadError
+ puts "You can't load Thinking Sphinx tasks unless the thinking-sphinx gem is installed."
{% endhighlight %}
Please note that if you've got Rails vendored, then this may not work so neatly. Thinking Sphinx's rake tasks load ActiveRecord, but it doesn't pick up on the vendored version - so you will "still need Rails gems installed normally": as well.

0 comments on commit f379766

Please sign in to comment.
Something went wrong with that request. Please try again.