2014-03-26 77 views

回答

0

完成rake spec的第二步後,您將安裝gem build bundler.gemspecgem 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是否滿足等等。

0

是的,這些應該是您的克隆的Bundler git回購中的binlib目錄的路徑。

dbundle別名的想法是,您可以通過在另一個項目中運行dbundle來輕鬆測試出您對Bundler所做的更改。由於別名指向源代碼的副本,因此每次更改時無需構建和安裝Bundler gem,就可以看到它的作用。

+0

謝謝,幫助! –