完成rake spec
的第二步後,您將安裝gem build bundler.gemspec
和gem install --local bundler-1.6.0.rc2.gem
。
這意思是當打捆本身是一個寶石和魔耙後,您需要安裝打捆寶石的這個混帳主版本。要檢查您是否使用捆綁軟件的主版本,請在任何目錄上運行bundle --version
,並且ti應該返回捆綁軟件版本1.6.0.rc2或類似的東西。
http://bundler.io/v1.5/man/bundle.1.html顯示您可以在包二進制使用ARGS。
爲了測試包的這個主二進制文件,創建一個新的目錄,並做bundle init
,一些寶石加給它安裝。例如:
# A sample Gemfile
source "https://rubygems.org"
gem "hello-world"
gem "gem-man"
and run `bundle install`.
now:
[email protected] ~/code/rsoc/bunch_of_gemfiles % bundle list
Gems included by the bundle:
* bundler (1.6.0.rc2)
* gem-man (0.3.0)
* hello-world (1.2.0)
[email protected] ~/code/rsoc/bunch_of_gemfiles % bundle check
The Gemfile's dependencies are satisfied
[email protected] ~/code/rsoc/bunch_of_gemfiles % bundle platform
Your platform is: x86_64-linux
Your app has gems that work on these platforms:
* ruby
Your Gemfile does not specify a Ruby version requirement.
基本上捆綁就像pacman的寶石,但提供了精確的寶石的子集,在你想要的確切版本。使用它的唯一方法就是使用它將在gem上使用它,也就是說:使用這個捆綁包的git master二進制文件來安裝gems,測試應用程序的gemfile中的deps是否滿足等等。
謝謝,幫助! –