Exclude gem files from heroin slugs (using .slugignore, heroku)

Rails 3.0.x project I am working using a gem that contains a large amount of test data that is not needed to deploy heroku. I would like to exclude this from a miss to the hero, since he adds several tens of megabytes to the slug (and several times deleted us beyond the size of 100 MB, our pool is large for other reasons.)

I tried to do this using the .slugignore mechanism, but I cannot find a way to exclude it in gems, not files in the application. This is a rails 3.0.x application running on a bamboo stack, but I upgraded to rails 3.1 and / or cedar cache if there was a workaround / procedure in these versions.

Other suggestions for correcting this that do not β€œmake a huge gem smaller” are also very encouraging and welcome.

+5
source share
2 answers

On the cedar stack, stones are installed in your folder vendor(the actual path is something like vendor/bundle/ruby/1.9.1/gems/), so I believe that you can slugignore the subfolders that you need, although I have not tried this.

0
source

In general, this will not work because .slugignore mapping files are deleted before installing gem files. See the following bit of heroku deployment output:

-----> Deleting 2 files matching .slugignore patterns.
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.0.pre.5
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
       Using rake (10.0.3)
       Using Platform (0.4.0)
       Using open4 (1.3.0)
       ...
0
source

All Articles