bundle install gems from local folder (bundle 从本地安装gem )
访问量: 5287
refer to :http://bundler.io/v1.5/bundle_install.html, http://bundler.io/v1.5/bundle_package.html
基本上,就是先使用 (first step, you should package the gems to vendor/cache folder)
$ bundle package # 自动把安装好的gem打包放到 vendor/cache目录下,
$ bundle install --local # 就会从这个目录下安装gem file ( and then, install the gems from your local vendor/cache folder )
另外, 在服务器上要注意: (also, notice that if you want to install gems in your production server: )
$ bundle install --deployment #会安装gem 到服务器上。 这种安装是:把所有的gem都装到vendor/bundle文件夹中。而不是 ~/.gem 文件夹。
$ bundle install --without development test 也适合安装gem 到服务器。