Search code examples
rubyruby-on-rails-3capistranobundlevendor

Rails 3 - big size of the application (around 65MB)


The app has the size 65MB. When got that the biggest size has the folder /vendor/bundle - almost 63MB.

So the question is - why? How can I reduce it? I am deploying my app with caipstrano and it takes so much times...


Solution

  • I'm sure deploing is a pain when the app has to be uploaded 65MB every time. You should look at the deploy_via remote_cache option in the /config/deploy.rb file

    add this to your /config/deploy.rb file

    set :deploy_via, :remote_cache
    

    Taken from http://help.github.com/deploy-with-capistrano/

      Remote Cache
    
    In most cases you want to use this option, otherwise each deploy will do a 
    full repository clone every time.
    
    set :deploy_via, :remote_cache
    Remote caching will keep a local git repo on the server you’re deploying to
    and simply un a fetch from that rather than an entire clone. This is probably 
    the best option as it will only fetch the changes since the last.
    

    So basically what happens is the first time you deploy your application everything is pulled from the repo, then every deployment thereafter only the change are pulled down.

    This also works with subversion.