开发者

What is the point of bundle package?

开发者 https://www.devze.com 2023-04-01 01:23 出处:网络
I understand what Rail\'s bundle package does and how to use it, but I\'m drawing a blank as to why it would b开发者_JAVA百科e a useful command. What utility does it have?bundle package will copy all

I understand what Rail's bundle package does and how to use it, but I'm drawing a blank as to why it would b开发者_JAVA百科e a useful command. What utility does it have?


bundle package will copy all the gems required by your application into the vendor/cache folder. This also includes dependencies required by the gems.

This helps because at the time of deployment you can just run bundle install --local to avoid dependency on the gems repository (rubygems.org) and install all the gems from the cached folder

Because each gem might have different dependencies depending upon the platform in which it is installed, it's recommended to use bundle package only when your development and deployment environments are alike.


You would use it when you have a need to not connect to the gem source, its useful if your moving files across machines and don't want to fetch gems from a remote source all the time. See the documentation here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号