0

我正在尝试设置捆绑器开发环境,并且已经通过https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md的第一步(完成了rake spec:depsrake spec但最后有两个待处理的工作http:/ /fpaste.org/88485/13957673/raw/ )

我不知道 $ alias dbundle='ruby -I /path/to/bundler/lib /path/to/bundler/bin/bundle' 的 lib 或 bin 路径可能是什么。是 bundler 源代码目录下的 lib 和 bin 目录吗?

4

2 回答 2

0

是的,这些应该是克隆的 Bundler git repo 中的bin和目录的路径。lib

别名的想法是您可以通过在另一个项目中dbundle运行来轻松测试您对 Bundler 所做的更改。dbundle因为别名指向您的源代码副本,所以您无需在每次进行更改时都构建和安装 Bundler gem 就可以看到它的作用。

于 2014-03-26T08:48:56.627 回答
0

完成第二步后rake spec,使用gem build bundler.gemspecand进行安装gem install --local bundler-1.6.0.rc2.gem

这意味着当 bundler 本身是一个 gem 并且在 rake 魔法之后,你需要安装这个 git master 版本的 bundler gem。要检查您是否使用的是 bundler 的主版本,请bundle --version在任何目录上运行,ti 应该返回 Bundler 版本 1.6.0.rc2 或类似的东西。

http://bundler.io/v1.5/man/bundle.1.html显示了您可以在捆绑二进制文件中使用的参数。

要测试这个包的主二进制文件,请创建一个新目录并执行bundle init,向其中添加一些要安装的 gem。例如:

# A sample Gemfile
source "https://rubygems.org"

gem "hello-world"
gem "gem-man"

and run `bundle install`.
now:
sindhu@leh ~/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)

sindhu@leh ~/code/rsoc/bunch_of_gemfiles % bundle check
The Gemfile's dependencies are satisfied

sindhu@leh ~/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.

基本上,bundle 就像 gems 的 pacman 一样,但在您想要的确切版本中提供了一个确切的 gems 子集。使用它的唯一方法是在 gems 上使用它,也就是说:使用 bundle 的这个 git master 二进制文件来安装 gems,测试应用程序的 gemfile 中的 deps 是否满足等等。

于 2014-03-26T05:44:46.580 回答