Thanks a lot for the reply. Unfortunately this did not quite do the
trick. I got a 0 for 1 args error for sudo. So I tried it this way:
run "cd #{current_path} && #{sudo('ultrasphinx:daemon:stop rake
RAILS_ENV=production')}"
but the I got the no rakefile found problem again...
trying it then just with the run command, and running as root, I got a
problem saying that a gem required (for running ultrasphinx --
chronic) was not found. So that makes me think that maybe the
environment is not being set up correctly, or that something different
is happening in the ruby environment for capsitrano that I am not
aware of.
Is there something I am missing? Maybe in the setup of capistrano?
Thanks a lot.
Robert
On Sep 2, 9:42 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
> 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
>
> > >
>
>
> smime.p7s
> 3KViewDownload
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---