Package up all your .gem files in vendor/cache


gem 'my_private_gem', :path => "vendor/gems/my_private_gem-VERSION"


gem list | awk '{print $1}' | xargs gem unpack --target vendor/gems



bundle install --deployment. This will install the gems, in their unpacked state, in vendor/bundle.


Package up all your .gem files in vendor/cache

$ bundle package


Running bundle install in an application with packaged gems will use the gems in the package and skip connecting to rubygems.org

$ bundle install --local


You can use this to avoid a dependency on rubygems.org at deploy time, or if you have private gems that are not in a public repository

你可能感兴趣的:(package)