ConradIrwin / pry-debundle

Allows you to use gems not in your Gemfile from Pry.
MIT License
50 stars 9 forks source link

Can't call Bundler.preserve_gem_path anymore in Bundler >= 1.12 #12

Open joallard opened 8 years ago

joallard commented 8 years ago
Debundling failed: undefined method `preserve_gem_path' for Bundler:Module
When reporting bugs to https://github.com/ConradIrwin/pry-debundle, please include:
* gem version: 2.5.1
* bundler version: 1.12.5
* pry version: 0.10.1
* ruby version: 2.3.1
* ruby engine: ruby
joallard commented 8 years ago

Bundler 1.12 1.12.pre.1 breaks it in 3c94eb74.

- Bundler.preserve_gem_path
+ Bundler.preserve_path_in_environment("GEM_PATH")
joallard commented 8 years ago

Actually I can't debundle with Bundler 1.12 anymore.

fgrehm commented 8 years ago

Not sure if it will work with this project but if I comment out the preserve_gem_path from here (which is based off this project) I was able to get things working for my use case

HTH

joallard commented 8 years ago

Indeed, not sure what the effect of the preserve_gem_path is exactly, but the new incantation as of 5131fcd seems to be something like

- Bundler.preserve_gem_path
+ Bundler::EnvironmentPreserver.new(ENV, %w(GEM_PATH)).backup

Still, if I comment the line out, I seem to get most of the functionality.

brandondrew commented 6 years ago

I get a similar error:

Loading development environment (Rails 3.2.22.5)

... output from my ~/.pryrc goes here

Debundling failed: undefined method `preserve_gem_path' for Bundler:Module
When reporting bugs to https://github.com/ConradIrwin/pry-debundle, please include:
* gem version: 2.5.2.3
* bundler version: 1.16.2
* pry version: 0.10.4
* ruby version: 2.3.7
* ruby engine: ruby