0

I'm trying to install a git version of heckle using bundler.

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:

$ 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?

Community
  • 1
  • 1
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338

1 Answers1

2

You can't. How would bundler know the dependencies when .gemspec is where the dependencies are supposed to be found.

If you look at the heckle Rakefile you will see:

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:

gem 'ruby_parser', '~> 2.3.1'
gem 'ruby2ruby',   '~> 1.3.0'
gem 'ZenTest',     '~> 4.7.0'
Casper
  • 33,403
  • 4
  • 84
  • 79
  • With just a line of Ruby you don't even need to do those manually. Just read the file, replace dependency with gem, and write the result to the GemFile. – vgoff Jun 20 '13 at 02:55