# When to use 'bundle package'

**URL:** <https://www.ruby-forum.com/t/when-to-use-bundle-package/194255>\
**Category:** Rails\
**Created:** [September 1, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/when-to-use-bundle-package/194255 "2010-09-01T18:18:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [September 1, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/when-to-use-bundle-package/194255/1 "2010-09-01T18:18:17Z")

</div>

Hi,

If you do ‘bundle install vendor’, gems will be installed in the  
application.  
Then, you can deploy it to your production server.

When do you need to do ‘bundle package’?  
If you do ‘bundle package’, the gem files will be in vendor/cache.  
Do you normally add vendor/cache to your git repository?

Thanks.

Sam

---

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [September 1, 2010, 7:29pm UTC](https://www.ruby-forum.com/t/when-to-use-bundle-package/194255/2 "2010-09-01T19:29:14Z")

</div>

On 01 Sep 2010, at 18:18, Sam K. wrote:

> If you do ‘bundle install vendor’, gems will be installed in the  
> application.  
> Then, you can deploy it to your production server.
> 
> When do you need to do ‘bundle package’?  
> If you do ‘bundle package’, the gem files will be in vendor/cache.  
> Do you normally add vendor/cache to your git repository?

The difference is that the vendor/cache folder contains the gem  
itself, and exactly the version you are using too.

When you do bundle install on your production server, bundler will use  
the gem files from vendor/cache to install the gems. This means gems  
don’t need to be downloaded again, so they install a lot faster, but  
native extensions are still compiled for the platform you deploy on.

To your last question: yes, you commit vendor/cache to the repository.

Best regards

Peter De Berdt
