使用bundle从github获取gem文件

时间:2016-01-21 22:54:57

标签: ruby-on-rails ruby git twitter-bootstrap bundler

我正在尝试使用bootstrap-fileinput  在rails项目中。我发现了一个github存储库,它似乎有宝石形式,但我不知道如何使用它。

gem 'rails-bootstrap-fileinput', :git => 'https://github.com/atalargo/rails-bootstrap-fileinput.git'
Gemfile 失败。 这可用作宝石吗? 如果不是我需要做什么来使用它? 链接到gem的Github存储库(据说)是在Gemfile中使用的上面的代码...

2 个答案:

答案 0 :(得分:1)

宝石名称不正确。尝试

gem 'bootstrap_fileinput', :git => 'https://github.com/atalargo/rails-bootstrap-fileinput.git'

将来,请参阅gems的.gemspec文件对其进行排序。

答案 1 :(得分:0)

如果您从公共GitHub存储库获取宝石,则可以使用简写

  

gem'nokogiri',:github => 'tenderlove /引入nokogiri'

参考Answer