デプロイ先のサーバーで rake assets:precompile を実行するには

config/deploy.rb

 29   after :restart, :clear_cache do
 30     on roles(:web), in: :groups, limit: 3, wait: 10 do
 31       # Here we can do anything such as:
 32       within release_path do
 33         # execute :rake, 'cache:clear'
 34         execute :rake, 'assets:precompile'
 35       end
 36       execute 'service httpd restart'
 37     end
 38   end

within release_path do から end の中に書かないとエラーになる。