Go back
We have been working with a lot of Rails engines and we have noticed that some of them have become very large when compiled as gems. Upon further investigation, we found out that some of these engines included the test/logs
when the gem is built, which is pretty useless for any end user.
If you’re making Rails engines, chances are you’ll have a Gemfile like this:
Try adding a huge image in your test/dummy/test/logs
folder and you’ll see that when you do gem build my_gem.gemspec
, the resulting .gem will be a bit larger than that image. We easily fixed this by adding a reject clause in the test_files portion of the gemspec like so: