I did the following which seems to work well
task :precompile, :roles => :web, :except => { :no_release => true }
do
run_locally("rm -rf public/assets/*")
run_locally("bundle exec rake assets:precompile")
servers = find_servers_for_task(current_task)
port_option = port ? " -e 'ssh -p #{port}' " : ''
servers.each do |server|
run_locally("rsync --recursive --times --rsh=ssh --compress --
human-readable #{port_option} --progress public/assets #{user}
@#{server}:#{shared_path}")
end
end
On Apr 5, 12:43 pm, Tim Uckun <[email protected]>
wrote:
> I have done more digging and it's not a capistrano problem, it's a
> rails problem For some reason the thing that takes a few seconds on my
> machine takes more than a half an hour on the server. I have seen the
> following recipes on the web which don't work with the current version
> of capistrano
>
> task :precompile do
> run_locally ("rake assets:clean && rake assets:precompile")
> upload( "public/assets", "#{release_path}/public/assets", :via
> => :scp, :recursive => true)
> end
>
> This fails because it wants a FILES env variable.
>
> %x{bundle exec rake assets:precompile}
> %x{rsync --recursive --times --rsh=ssh --compress --human-
> readable --progress public/assets #{user}@#{host}:#{shared_path}}
> %x{bundle exec rake assets:clean}
>
> this fails because it doesn't know what host is.
>
> I like the rysnc idea. Can that be made to work. Is there a way to
> specify "the current host you are deploying to"?
--
* 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