[英]Getting dependencies of git repo without .gemspec with bundler
I'm trying to install a git version of heckle using bundler. 我正在尝试使用bundler安装一个git版本的heckle。
At first I tried 起初我试过了
gem "heckle", :github => 'phiggins/heckle', :branch => "ruby_parser"
But that didn't work, with 但那并没有奏效
Could not find gem 'heckle (>= 0) ruby' in git://github.com/phiggins/heckle.git (at master).
Source does not contain any versions of 'heckle (>= 0) ruby'
I then specified the version of heckle, as per https://stackoverflow.com/a/3952045/38765 but bundler doesn't try installing any dependencies of heckle: 然后我根据https://stackoverflow.com/a/3952045/38765指定了heckle的版本,但是bundler没有尝试安装heckle的任何依赖项:
$ bundle exec heckle
gives me 给我
cannot load such file -- ruby_parser (LoadError)
How do I tell bundler to find heckle's dependencies when there isn't a .gemspec? 当没有.gemspec时,如何告诉bundler找到heckle的依赖?
You can't. 你不能。 How would bundler know the dependencies when .gemspec
is where the dependencies are supposed to be found. 当.gemspec
是应该找到依赖.gemspec
的地方时, .gemspec
如何知道依赖项。
If you look at the heckle Rakefile
you will see: 如果你看看Rakefile
你会看到:
dependency 'ruby_parser', '~> 2.3.1'
dependency 'ruby2ruby', '~> 1.3.0'
dependency 'ZenTest', '~> 4.7.0'
You just have to add those manually to your Gemfile
: 您只需手动将这些添加到您的Gemfile
:
gem 'ruby_parser', '~> 2.3.1'
gem 'ruby2ruby', '~> 1.3.0'
gem 'ZenTest', '~> 4.7.0'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.