Alex Rivera | Logout

How to reduce heroku slug size?

Asked 2011-08-31T11:07:24.270
9

My slug size is 89.5MB which is huge.

However the repository size is quite small:

$ du -hsc 
8.0M    . 
8.0M    total

Following this blog post: http://dazedthots.blogspot.com/2011/07/reducing-slug-size-heroku.html , there is a bug on Heroku with changing Gemfiles. Mine has changed several times including git dependencies but now, the only git dependency is "rails_admin". See below:

source 'http://rubygems.org'

gem 'rails',      '~> 3.1.0'
gem 'rails-i18n', '~> 0.1.3'
gem 'pg',         '~> 0.11.0'
gem 'rake',       '~> 0.8.7'
gem 'thin', '~> 1.2.11'
gem 'heroku', '~> 2.4.0'
gem 'squeel',     '~> 0.8.6'
gem 'devise', '~> 1.4.2'
gem 'slim-rails',  '~> 0.2.0'
gem 'simple_form', '~> 1.4.2'
gem 'will_paginate', '~> 3.0'
gem 'sunspot_rails', '~> 1.2.1'
gem 'jquery-rails',    '~> 1.0.12'
gem 'modernizr-rails', '~> 2.0.6'
gem 'rails_admin', git: 'https://github.com/sferik/rails_admin.git'
gem 'sass-rails',   '~> 3.1.0'
gem 'coffee-rails', '~> 3.1.0'
gem 'uglifier',     '~> 1.0.0'
gem 'newrelic_rpm'

I've contacted the Heroku support but no answer until now? Any idea?

Edit
Report

1 Answer

0

Being as Heroku have acknowledged the problem in the post you have referenced I would wait and sit it out until Heroku have fixed it their end. I take it you've already looked into some of the other ways to reduce a slug size with a .slugignore file?

Slug size will include all your gems so the more gems you use the larger your slug size will be since each Heroku app maintains it's own gems these days. I'd not heard of :git referenced gems using more space but I have now though.

answered 2011-08-31T12:22:36.477

Your Answer