Bundler

###bundle - Ruby Dependency Management

Bundler manages an application’s dependencies through its entire life across many machines systematically and repeatably.

Bundler 可根据Gemfile文件安装,更新,执行,调用gem。

####PRIMARY COMMANDS bundle install(1) bundle-install.1.html Install the gems specified by the Gemfile or Gemfile.lock

   bundle update(1) bundle-update.1.html
          Update dependencies to their latest versions

   bundle package(1) bundle-package.1.html
          Package the .gem files required by  your  application  into  the
          vendor/cache directory

   bundle exec(1) bundle-exec.1.html
          Execute a script in the context of the current bundle

   bundle config(1) bundle-config.1.html
          Specify and read configuration options for bundler

####gem安装顺序

Gems will be installed to your default system location for gems. While installing gems, Bundler will check vendor/cache and then your system’s gems. If a gem isn’t cached or installed, Bundler will try to install it from the sources you have declared in your Gemfile.

通过bundler,Gems会被安装在本地机器,当安装gems时,Bundler首先检查vendor/cache目录,然后检查系统的gems。如果这个gem还没有被缓存或者安装,那么系统将从Gemfile的gem源里安装。

Install your dependencies, even gems that are already installed to your system gems, to a location other than your system’s gem repository. In this case, install them to vendor/bundle.

$ bundle install --path vendor/bundle

查看帮助

$ bundle --help install

参考: http://gembundler.com/

--EOF--

声明:若无特别说明,本站文章均为原创,转载请保留链接,谢谢

Published: 2013-02-19
blog comments powered by Disqus