Im using the gem for thinking sphinx:
sudo gem install freelancing-god-thinking-sphinx \
--source http://gems.github.com
So:
require 'vendor/plugins/thinking-sphinx/recipes/thinking_sphinx'
Which is prescribed on the website does not work.
How do I include the capistrano thinking sphinx tasks in my deploy.rb file when using the gem?
EDIT
Adding: require 'thinking_sphinx/deploy/capistrano'
gives me:
/usr/lib/ruby/gems/1.8/gems/freelancing-god-thinking-sphinx-1.1.12/lib/thinking_sphinx/deploy/capistrano.rb:1: undefined method `namespace' for main:Object (NoMethodError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.8/lib/capistrano/configuration/loading.rb:152:in `require'
The simple require as defined in another answer - thinking_sphinx/deploy/capistrano - should work. If it's not, are you seeing any errors? What version of the gem are you using?
If that fails, perhaps try a sudo gem update
in case your gems are old.
@Khelll: could you please read the Topic? You are pasting code for using TS as plugin.
As Gem you should use:
require 'thinking_sphinx/deploy/capistrano'
That works perfectly.
One should also change the capistrano tasks mentioned on the website to reflect the new before and after callbacks from capistrano to get rid off the deprecation notices:
before "deploy:update_code", "thinking_sphinx:stop"
after "deploy:symlink", "symlink_sphinx_indexes"
after "deploy:symlink", "thinking_sphinx:configure"
after "deploy:symlink", "thinking_sphinx:start"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With