Try this:

run "cd #{current_path} && #{sudo} rake RAILS_ENV=production ultrasphinx:daemon:stop"

Doing it as a sudo() call results in the following command:

  sudo cd #{current_path} && rake ...

Which does the cd as sudo, and the rake as not-sudo...

- Jamis

On Sep 2, 2008, at 5:01 PM, robert.najlis wrote:


Sorry if this is an old issue, but I have been searching, and have
been unable to find an answer for this.

I am trying to call a rake task from my capistrano script

The command I am using is
sudo "cd #{current_path} && RAILS_ENV=production rake
ultrasphinx:daemon:stop"

However, I get the following error:

[out :: localhost] rake aborted!
** [out :: localhost] No Rakefile found (looking for: rakefile,
Rakefile, rakefile.rb, Rakefile.rb)
** [out :: localhost] /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/
rake.rb:2143:in `raw_load_rakefile'
** [out :: localhost] (See full trace by running task with --trace)
   command finished

I have tried doing things in the deploy.rb file such as setting the
rake file with comands like

set :rake, "rake -f rails/Rakefile"

but to no avail

If anyone has any ideas I would be most appreciative

Thanks a lot.

Robert

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to