Hi guys,

in case some of you want to use TS outside Rails/Merb (tested with
Ramaze at least) - you can try this:
- take the latest TS out of git ("piston import" works well here)
- apply this patch: http://gist.github.com/179662 which allows you to
specify an 'environment init' task which will be called by TS before
ts:start, ts:index ...

Then to ensure the TS tasks call your own environment task first:

# boot.rb

ThinkingSphinx::Configuration.configure do |config|
  config.app_root = File.expand_path(File.dirname(__FILE__) + '/..')
  config.app_env_task = :environment
end

def boot_my_env
  ..
end

# Rakefile

require 'boot'

task :environment do
  puts "Ramaze environment (tm)"
  boot_my_env
end

I must say thanks to Pat for applying all the patches required for
this to work (except this last one which requires to be fixed to still
work when Rails is used!).

HTH,

Thibaut
--
http://www.learnivore.com
http://blog.logeek.fr
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to