4

Locally my application is 7MB without tests and logs, etc. The .git folder is 29 MB. I also have no gems / plugins in vendor folder. 95% of images sit on S3. However on committing to Heroku it shows -----> Compiled slug size is 62.7MB

What is wrong? It happened?

To add more context my .gitignore file is .bundle, db/.sqlite3, config/database.yml, log/.log, tmp/, .idea, .redcar, .sass-cache/, multi_xml/, test/, doc/

Please advice

Pykih
  • 2,769
  • 3
  • 29
  • 38

3 Answers3

1

The compiled slug size includes all of your gems as well. If you're on the Cedar stack, they've made some mistakes that will make your some gems with native extensions even bigger than they're supposed to be.

Michael Fairley
  • 12,980
  • 4
  • 26
  • 23
  • Thank you Michael. I check I am on bamboo-mri-1.9.2 stack. So you are suggesting I reduce the number of gems I use and it solve the problem. – Pykih Sep 24 '11 at 06:25
  • It seems only Aspen has pre-installed gems http://installed-gems.heroku.com/. Bamboo and Cedar dont. So I need to go on a GEMS diet to bring down the slug size. – Pykih Sep 24 '11 at 06:42
0

Moved to Cedar and then cleaned up public/assets everytime precompiling again. Reduced slug size drastically.

Pykih
  • 2,769
  • 3
  • 29
  • 38
0

Look into having a .slugignore file in your root folder. It tells Heroku the files not to compile into slug. Checkout this answer. Redeploy your app if the reduction in slugsize is not instant.

Community
  • 1
  • 1
Igbanam
  • 5,904
  • 5
  • 44
  • 68