[Rails] When to use 'bundle package'

2010-09-01 Thread Sam Kong
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
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Talk group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] When to use 'bundle package'

2010-09-01 Thread Peter De Berdt

On 01 Sep 2010, at 18:18, Sam Kong 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

--
You received this message because you are subscribed to the Google Groups Ruby on 
Rails: Talk group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.