Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

heroku is not part of the bundle #173

Closed
et opened this issue Oct 27, 2011 · 12 comments
Closed

heroku is not part of the bundle #173

et opened this issue Oct 27, 2011 · 12 comments

Comments

@et
Copy link

et commented Oct 27, 2011

I did something that seemed to put heroku in a bad state, but I'm quite sure what. Whenever I try to issue a heroku command, I receive the following error:

heroku -v
/home/et/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/rubygems_integration.rb:143:in `block in replace_gem': heroku is not part of the bundle. Add it to Gemfile. (Gem::LoadError)

This occurs with both bundler 1.0.21 and 1.1rc, so I suspect that it's the heroku gem that's the issue and not bundler.

@geemus
Copy link
Contributor

geemus commented Dec 16, 2011

@et thats no good. Sorry for the delay in response. Are you still seeing this issue?

@amarraja
Copy link

amarraja commented Jan 2, 2012

@geemus I am seeing this issue as well with Bundler 1.0.21 and Heroku 2.17.0. It only appears to happen when I am in the root of another project which has a Gemfile. Adding Heroku to the development group is a quick workaround

Thanks

@geemus
Copy link
Contributor

geemus commented Jan 16, 2012

@amarraja - thanks for the specific feedback on how you are reproducing it. Are either of you using binstubs or anything like that (ie non-default bundler args in your projects). When I naively try to just go to someplace with a Gemfile that doesn't include bundler in my folders and run commands I'm not managing to get the same behavior as either of you. Also, what operating system are you guys on?

@amarraja
Copy link

@geemus I just tried to recreate this and it was as simple as creating a new rails app, changing to the directory and running heroku. I have put the app I just made here: https://github.com/amarraja/bundler-heroku so you can try with the same copy.

I am on OSX and using RVM, mainly with my global gemset. I also tried with a fresh rvmrc so everything has to be installed again, and still got the same issue. I will try and have a play and see if I can get more info. Let me know if there is anything else I can get which will help

Cheers
Amar

@geemus
Copy link
Contributor

geemus commented Jan 17, 2012

@amarraja I couldn't reproduce this on my machine with your repo or with a fresh rails app. I suspect you may have other non-default behavior, are you perhaps using bundler-exec in your bash profile stuff? (see: https://github.com/gma/bundler-exec). That would automatically prepend bundle exec before heroku and cause this issue. I would recommend either removing that from your bash or just planning on adding heroku to the Gemfile. Regardless, in so far as I can tell this is not actually a problem with the heroku gem itself. Happy to continue helping if you have trouble getting this fixed for yourself, but I'm going to close this as an issue. Thanks!

@geemus geemus closed this as completed Jan 17, 2012
@amarraja
Copy link

@geemus that seems correct, I tried in a VM and it worked. I normally use bundle exec explicitly (and never really use binstubs) so it's a bit strange. I will investigate my setup and post findings here for anyone with the same issue. Thanks for taking the time to look into it!

@amarraja
Copy link

Found it. I use the oh-my-zsh package, and it appears the bundler plugin wraps certain commands, one of which is heroku. https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/bundler/bundler.plugin.zsh

I will send a pull request to removing this.

Thanks again!
Amar

@geemus
Copy link
Contributor

geemus commented Jan 18, 2012

@amarraja great, thanks for the update.

@Stevancw
Copy link

Stevancw commented Mar 4, 2012

This was very helpful!
I had not even considered the bundler plugin- I removed it from my .zshrc and everything worked as usual.

Many thanks

@gilesbutler
Copy link

Thanks for the fix guys, just had the same problem, seems it still hasn't been fixed in the bundler plugin.

@amarraja
Copy link

@gilesbutler thanks for the reminder! I have just submitted a pull request: ohmyzsh/ohmyzsh#1138

@shannonwells
Copy link

I also experienced this problem and had an old version of the heroku binary sitting around in my rvm gemset that would use bundler. Once I uninstalled the old gem and made sure I was using /usr/bin/heroku, everything was fine.

chrodan pushed a commit to chrodan/oh-my-zsh that referenced this issue Oct 30, 2013
The heroku command should not be executed via bundler, see:
heroku/legacy-cli#173
kenton pushed a commit to kenton/oh-my-zsh that referenced this issue Jan 9, 2015
The heroku command should not be executed via bundler, see:
heroku/legacy-cli#173
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants