copy the manifest.json file from local to server best approach

79 views
Skip to first unread message

Theo

unread,
Nov 5, 2014, 2:09:42 AM11/5/14
to capis...@googlegroups.com
Trying to write a custom capistrano task that simply copied one file from my local machine to the application server that is being deployed to.

I have looked at upload! and other functions but can't seem to get it working. Also attempted to try rsync but that is not fun on windows.

What im trying to solve is every time i deploy with capistrano (cap production deploy). I want rake assets:precompile to run, and then push up those assets to amazon s3. This is not an issue and is currently working fine. However also to ensure the rails application server is able to make sense of the digests to use when rendering assets i need to copy the e.g. \public\assets\manifest-8b74009c0e14289ecc5d15a5f7de36a3.json file over to each servers \public\assets folder.

Which just got me thinking right now, why don't i just run the rake assets:precompile RAILS_ENV=production locally and then just commit the generated manifest file \public\assets\manifest-8b74009c0e14289ecc5d15a5f7de36a3.json to git, and perform a deploy after that point.

Hope you can provide some alternatives on how you would solve this problem?





Lee Hambley

unread,
Nov 5, 2014, 4:33:52 AM11/5/14
to capistrano
I have looked at upload! and other functions but can't seem to get it working. Also attempted to try rsync but that is not fun on windows.

​We use SCP, not SFTP, there are subtle, but important differences, check with your hosting provider.​
 
Reply all
Reply to author
Forward
0 new messages