It should not run "which rake" that was an undocumented accidental feature
of method missing in cap2. See the Sshkit command map (Google) to see how
this works in cap3.
On 13 Nov 2013 19:48, <[email protected]> wrote:

> Perhaps this problem is with the "execute" method?
>
> I created a simple task to figure out which rake was being used, but it
> appears symbols are not resolved for execute, they are just converted into
> strings.
>
> For example:
>
> task :which_rake do
>   on roles(:all) do
>     set :which, "where"
>     execute :which, "rake"
>   end
> end
>
> This should execute "where rake" however, it actually executes "which
> rake" because it doesn't resolve the :which symbol as it used to in
> capistrano 2.
>
> It seems like this is by design for capistrano 3, and indeed, switching
> the code to:
>
> execute fetch(:which), "rake"
>
> creates the expected output.
>
> I've seen this pattern (not using fetch) used a lot with execute, even in
> the deploy template. Should execute be resolving symbols? or should
> everything be updated to use fetch()? What is the reason for passing a
> symbol as opposed to a string if symbols are not resolved?
>
> Any thoughts on this?
>
> -David
>
> On Tuesday, November 12, 2013 12:29:18 PM UTC-6, [email protected]:
>>
>> I'm unable to run the correct rake version because calls to rake don't
>> take into account I'm using bundler.
>>
>> I've included:
>> require 'capistrano/bundler'
>> along with:
>> require 'capistrano/rails/assets'
>> require 'capistrano/rails/migrations'
>>
>> Deploying works fine until it comes time to run the assets:precompile
>> task. The command that is executed is:
>>
>> RAILS_ENV=staging /usr/bin/env rake assets:precompile
>>
>> Instead of "rake" it should be "bundle exec rake" or "bin/rake" because
>> I'm using bundler.
>>
>> I've tried setting the value of :rake, by adding:
>> set :rake, 'bundle exec rake'
>> to my deploy.rb file. However, it doesn't make any difference.
>>
>> I'm not sure if this is an issue with Capistrano, or more likely with the
>> Capistrano bundler support?
>>
>> Any thoughts on how to fix this?
>>
>> Thanks,
>>
>> David
>>
>>  --
> --
> * You received this message because you are subscribed to the Google
> Groups "Capistrano" 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/capistrano?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" 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/capistrano?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to