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/
Make sure that you include a .slugignore file (similar to .gitignore,
but
for heroku) and that you do not include development and test gems (this
is
automatic on cedar, on the other stacks you need to add this manually).
You need to make sure that bundle (on heroku) does not include the
development and test gems.
run “heroku config” and look for a BUNDLE_WITHOUT line that should
contain
development:test
slugignore is useful to exclude assets like psd’s that live in your git
but
should not be part of slug. Also some of the less common gems count to
your
slug size even if they are not in your vendor directory. If you include
gems
through :git => they also automatically add to your slug size.
To give you a ballpark figure: My sites have a slugsize of about 50 to
60
meg on cedar on average.
Thanks a lot Martin. Only Aspen stack has preinstalled gems. (http:// installed-gems.heroku.com/) Bamboo and Cedar dont. Hence my slug is
high. I need to reduce my gems.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.