2012-02-21 52 views
1

所以,很多人喜欢把宝石分叉和添加功能等等。这很好。但它使得尝试他们的宝石一点点的工作,如果你必须自己克隆宝石,下载,安装等。使用bundler编译github上托管的gems?

我希望能够有捆绑器编译宝石如果没有pkg /gem_name.gem文件

这是我在做什么目前:

gem "yard-rest-plugin", :git => "git://github.com/ql/yard-rest-plugin.git" 

然后是bundle update错误:

Could not find gem 'yard-rest-plugin (>= 0) ruby' in git://github.com/ql/yard-rest-plugin.git (at master). 
Source does not contain any versions of 'yard-rest-plugin (>= 0) ruby' 

因此为什么它会是如果它不错自动编译。

+0

也许是约定的命名问题......对于信息,这里是我用户成功地包含回形针:'gem'paperclip',:git =>'git://github.com/thoughtbot/paperclip.git' ' – 2012-02-21 17:41:17

+0

是的,宝石实际上称为码休息,编译会很棒。 o.o – NullVoxPopuli 2012-02-21 17:43:43

回答

2

看起来像宝石的名称宝石“院子里休息”所以这应该工作:

gem "yard-rest", :git => "git://github.com/ql/yard-rest-plugin.git" 

https://github.com/ql/yard-rest-plugin

+0

啊,我很怀念这个特殊情况。但是,捆绑器编译宝石呢? – NullVoxPopuli 2012-02-21 17:39:13

+0

不是纯粹的编译,而是bundler可以为你打包宝石 - bundle install --deployment会安装到vendor/bundle中。这里讨论几个选项:http://stackoverflow.com/questions/3646847/how-do-i-vendorize-gems-for-rails3-bundler或http://gembundler.com/bundle_install.html – 2012-02-21 18:04:22

+0

不完全相同= \,造成这个问题的原因是我想从git仓库中使用一个没有编译过的gem托管版本的gem。 – NullVoxPopuli 2012-02-22 14:20:43