Hmm, so this needs to be neater for those using TS as a plugin - given  
that RAILS_ROOT doesn't exist, the Rails environment isn't loaded, and  
thus the load paths aren't set. I'll keep it in mind and see what I  
can do.

Good to know you've got it working though :)

-- 
Pat

On 06/06/2009, at 10:46 AM, Bharat wrote:

>
> Pardon my somewhat rusty Capistrano skills.  But the RAILS_ROOT is not
> defined within the Capistrano environment, duh.  Here is what I did:
>
> set :rails_root, "#{File.dirname(__FILE__)}/.."
> require "#{rails_root}/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/deploy/capistrano"
>
> Capistrano variable :rails_root is unashamedly stolen from the boot.rb
> file in the same 'config' directory (modeled after RAILS_ROOT).  Here
> is my Capistrano script with Thinking Sphinx recipes loaded if anyone
> is interested:
>
> set :rails_root, "#{File.dirname(__FILE__)}/.."
> require "#{rails_root}/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/deploy/capistrano"
>
> set :application, "ssfilemgr"
> set :repository, "[email protected]:some_git_user/ssfilemgr.git"
>
> set :user, "bruparel"
> set :runner, "bruparel"
> set :admin_runner, runner
>
> set :domain, '192.168.1.104'
> role :app, domain
> role :web, domain
> role :db,  domain, :primary => true
>
> set :deploy_to, "/home/#{user}/r_work/#{application}"
>
> set :deploy_via, :remote_cache
> set :scm, "git"
> set :branch, "master"
> set :scm_verbose, true
> set :use_sudo, false
>
> namespace :deploy do
>
>  desc "Restart Application"
>  task :restart do
>    run "touch #{current_path}/tmp/restart.txt"
>  end
>
>  desc "Cleanup older revisions"
>  task :after_deploy do
>    cleanup
>  end
>
> end
>
> after "deploy:setup", "thinking_sphinx:shared_sphinx_folder"
>
> >


--~--~---------~--~----~------------~-------~--~----~
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