I've run into this issue just now so I suppose it's still an issue. Using the set :rails_root patch Bharat posted about previously does get it to work.
-Wade On Jul 26, 11:50 am, Pat Allan <[email protected]> wrote: > Hi Galen > > TS was updated a while ago to get around this issue - or something > like it - how recent is your version of Thinking Sphinx? > > -- > Pat > > On 22/07/2009, at 2:47 PM, Galen wrote: > > > > > > > Hey, I'm having the same problem with one caveat: > > > Capistrano is finding my file via the relative path. Only, it still > > thinks its not in a capistrano recipe. I've tried it in my Capfile and > > in my deploy.rb. > > > Any thoughts? > > > Here's the actual error: > > > /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/lib/capistrano/ > > configuration/loading.rb:18:in `instance':Please require this file > > from within a Capistrano recipe (LoadError) > > from ./vendor/plugins/thinking-sphinx/lib/thinking_sphinx/deploy/ > > capistrano.rb:1:in `load' > > from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/lib/capistrano/ > > configuration/loading.rb:172:in `load_from_file' > > from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/lib/capistrano/ > > configuration/loading.rb:89:in `load' > > from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/lib/capistrano/ > > configuration/loading.rb:86:in `load' > > from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/lib/capistrano/ > > configuration/loading.rb:86:in `each' > > from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/lib/capistrano/ > > configuration/loading.rb:86:in `load' > > from Capfile:3:in `load' > > from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/lib/capistrano/ > > configuration/loading.rb:172:in `load_from_file' > > ... 8 levels... > > from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/lib/capistrano/cli/ > > execute.rb:14:in `execute' > > from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.5/bin/cap:4 > > from /usr/bin/cap:19:in `load' > > from /usr/bin/cap:19 > > > Thanks in advance! > > > On Jun 8, 2:31 am, Pat Allan <[email protected]> wrote: > >> 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 -~----------~----~----~----~------~----~------~--~---
