heroku stop working after update #298

Closed
kisin opened this Issue Apr 25, 2012 · 53 comments

Projects

None yet
@kisin

i just run "heroku update" and after the update the heroku command returns error:

<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- netrc (LoadError)
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from C:/Users/kisin/.heroku/client/lib/heroku/auth.rb:4:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from C:/Users/kisin/.heroku/client/lib/heroku/client.rb:5:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from C:/Program Files (x86)/Heroku/lib/heroku.rb:6:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from C:/Program Files (x86)/Heroku/heroku:19:in `<main>'

im using windows 7 and railsinstaller

@geemus
Heroku member

@kisin - I'm working to find a fix, but in the mean time as a work around you can delete the C:/Users/kisin/.heroku/client directory to revert back to the old version. That should at least get you un-stuck for the time being.

@geemus
Heroku member

@kisin - alternatively, you might consider simply downloading and installing the latest from http://toolbelt.heroku.com (as I have been unable to reproduce this error).

@geemus
Heroku member

After a bit more digging it seems that this has to do with updating from/to some particular older versions and is not a bug that exists in newer stuff. As such I think if you grab and install the latest toolbelt you should be good to go. Thanks!

@geemus geemus closed this Apr 25, 2012
@kisin

after reinstall the heroku cli everything is back working.
thanks

@gregschwartz

Just ran into the same error, this time on a Mac. Is this issue pretty rare? If so, I'll just go reinstall the toolbelt.

@geemus
Heroku member

@gregschwartz - I think it is relatively rare, so a reinstall is probably the best bet. I think the issue crops up in a from-a-particular-version to-a-particular-version sort of way. So most people shouldn't encounter it.

@gregschwartz

Odd, just reinstalled and I'm still running into it. Do I need to remove something?

@geemus
Heroku member

@gregschwartz - Hmm. You may also need to remove the ~/.heroku/client directory. I hadn't considered that part of the equation. I suspect that will get you back up and running though.

@gregschwartz

Yup, that got me up and running on what looks like the old version. Hopefully I don't need anything from the new one! Thanks for your help, @geemus!

@geemus
Heroku member

@gregschwartz - ah, interesting. I would have thought that it would have ended up using whatever the latest toolbelt you had installed was. At the very least you should be able to re-download and install the toolbelt and get up to the latest (and update should work after that). By no means was I actually trying to have you end up on an old version. Hopefully we can get you on the latest because that would be more awesome.

@gregschwartz

Deleted the client directory, reinstalled the toolbelt, and now getting this:

$ heroku version
heroku-gem/2.6.1

That's not the right version, is it?

@geemus
Heroku member

@gregschwartz - no, off by a bit (latest should be 2.25.0). Did you get the latest toolbelt from http://toolbelt.heroku.com ?

@geemus
Heroku member

@gregschwartz - also, did you have a gem version installed prior to the toolbelt? Its possible that the order of bin files is such that the gem version is winning out over toolbelt. So doing gem uninstall heroku might be in order as well. Sorry for all the confusion here, we are working to make all this smoother but we have had some transitional pains along the way.

@gregschwartz

@geemus Hm, interesting. I uninstalled the gem, installed the toolbelt, and then had the right version (2.25.0)!

But, when I ran bundle install afterward I saw "Installing heroku (2.6.1)". And indeed, heroku version is back to "heroku-gem/2.6.1".

And our Gemfile just says: gem 'heroku'. I'm guessing this is an issue with our Gemfile, not RubyGems.org, right? If so, I'll talk to the rest of my team and deal with it here.

@geemus
Heroku member

@gregschwartz - good to know. bundle install is probably locking to that version for a reason. Most likely your gemfile either 1) lists that particular version for the heroku gem or 2) lists something else which depends on this particular version. My guess is that 1 is somewhat more likely, but its hard to say. If you posted your Gemfile and Gemfile.lock files I could probably tell you, but barring that your team can probably help you out. Thanks!

@gregschwartz

I'll talk to them about it, thanks for the help @geemus!

@klimchuk

Had same problem on mac
gem uninstall heroku
worked just fine!

@geemus
Heroku member

@klimchuk - thanks for the update, good to know this is pretty consistent at least.

@nbashaw

ran into the same problem, but removing the ~/.heroku/client directory after installing the toolbelt from https://toolbelt.heroku.com/ worked for me!

@geemus
Heroku member

@nbashaw - great, thanks for the update.

@bengm

I ran into the same issue. Not sure how rare it would be, since I'm a pretty simple user, and haven't done anything tricky config-wise. Installing the toolbelt and deleting the client directory seemed to work for me. (Though I still can't find my postgres version using pg:info, which was what led me to do the upgrade in the first place).

@chuckweinberger

Just experienced the same problem. gem uninstall heroku worked for me.

@geemus
Heroku member

Thanks for the updates guys, I have it on my shortlist to try and write a fix for this (probably next week).

@karl-petter

Also ran into this issue. gem uninstall heroku followed by gem install herokusolved it for me.

I'm on Mac and is using RVM, could RVM give this?

Here is the output from running those two commands if that could be of any help:

$> gem uninstall heroku
Remove executables:
    heroku

in addition to the gem? [Yn]  
Removing heroku
Successfully uninstalled heroku-2.11.0

$> gem install heroku
Fetching: excon-0.16.1.gem (100%)
Fetching: heroku-api-0.3.4.gem (100%)
Fetching: netrc-0.7.7.gem (100%)
Fetching: heroku-2.30.3.gem (100%)
 !    Heroku recommends using the Heroku Toolbelt to install the CLI.
 !    Download it from: https://toolbelt.heroku.com
Successfully installed excon-0.16.1
Successfully installed heroku-api-0.3.4
Successfully installed netrc-0.7.7
Successfully installed heroku-2.30.3
4 gems installed
Installing ri documentation for excon-0.16.1...
Installing ri documentation for heroku-api-0.3.4...
Installing ri documentation for netrc-0.7.7...
Installing ri documentation for heroku-2.30.3...
Installing RDoc documentation for excon-0.16.1...
Installing RDoc documentation for heroku-api-0.3.4...
Installing RDoc documentation for netrc-0.7.7...
Installing RDoc documentation for heroku-2.30.3...
@geemus
Heroku member

@karl-petter - thanks for the update. It could be rvm related, but I use rvm and haven't seen it, so I don't think it is just rvm all by itself necessarily.

@deeperx

Above solution didn't work for me. If you're still having the same problem, try this:

Remove heroku client:

rm -rf ~/.heroku/client
@geemus
Heroku member

@inancgumus - thanks for the extra data. I made a fix a couple days ago that I'm hoping should help with this, ought to be able to release it later today.

@jgentes

ran into this on Windows 7 after updating today using 'heroku update'.

Fixed by deleting /users/me/.heroku/client and reinstalling from https://toolbelt.heroku.com/

@geemus
Heroku member

@jgentes - thanks for the update. It didn't occur to me somehow that this would also fix it quickly/simply but I can certainly imagine how that would do it. I'll probably recommend that to anybody else with this issue moving forward.

@rubyshoes

I have tried:

Remove the heroku toolbelt

rm -rf /usr/local/heroku
rm -rf /usr/bin/heroku

Remove the heroku gem

gem uninstall heroku

I got a message which gem to uninstall, so I chose 'all'

Install the heroku toolbelt, again.

Closed the terminal and opened a new one and got the same message with respect to 'heroku update' .... namely 'heroku update is only available from heroku toolbelt.

So then I tried:

rm -rf ~/.heroku/client

and reinstalled the toolbelt and still no joy ... lol ... I have tried to get this to work a number of occasions and eventually I give up.

The only reason I am trying to get this to work is that I cannot get my app to work when I go to heroku.com and run it from heroku ... I just get a grey screen.
On the other hand if I use 'heroku open' from my command line in my app, my app opens and all of the navigation works.

I checked heroku logs and there is no error there.

Anyone have some other ideas ... ohh ... I forgot 'Heroku support says that I must have an error in my app' so no help from them.

HELP:)

@geemus
Heroku member

@rubyshoes - sorry to hear that. What do you get for which heroku? It seems like it is using the wrong bin file for some reason, so hopefully I can help with that. What do you mean when you say "go to heroku.com and run it from heroku"?

@rubyshoes

Hi geemus,

Wow ... thanks for your reply.
I have dual boot on my laptop ... so if I exit ubuntu and start up again in my windows environment and then I set my browser to www.heroku.com and log in. I then choose my application and click on its url ... It opens but just to a grey screen.
The 'which heroku' returns ./bundler_stubs/heroku.

Thanks for your help in advance.

@geemus
Heroku member

@rubyshoes ah ha, that is definitely not where I would expect to see the bin file. Is there a reason you need to have the heroku gem in the Gemfile for your app? It looks like it being there is causing that version to be used (rather than using the system level toolbelt installation). Removing it from the Gemfile and doing a new bundle install should help, but if not you may want to double check which heroku again, if it still says ./bundler_stubs/heroku after changing the Gemfile I'd just delete that file manually. Doing so should cause the rest of your path to be searched (which ought to include the toolbelt version of the file). Hope that sorts it out for you but let me know if you have further questions or concerns.

@rubyshoes

Hi Geemus,

Thanks for your help ... commented out the heroku gem and ran bundle install again ... 'which heroku' still returned ./bundler_stubs/heroku. I tried heroku update at this point and got a Gem::Exception .... so I removed the heroku to be found in ./bundler_stubs and then I ran 'heroku update' again. this time I got bash: ./bundler_stubs/heroku: no such file or directory.
This bundler_stubs seems to come from the RVM Bundler integration(handler). I have in my notes: "If we add another executable, then we have to re-run the --binstubs=./bundler_stubs line. Do you have any experience with this ... it has something to do with the fact that we had to precede each command like rake with bundle exec rake so that the program ran in the exact gem environment specified by the Gemfile.
Well I ran the bundel --binstubs=./bundler_stubs and reinstated heroku in the Gemfile and I got the same old results.
Do you see a way through all of this Geemus:)

@rubyshoes

Hi Geemus,

I reconfigured RVM to include the proper executables in the local environment as per my notes on the RVM Bundler Integration(handler) as follows:

moved to the home directory: cd ~
rvm get head && rvm reload
chmod +x $rvm_path/hooks/after_cd_bundler

then I changed to my project directory

and here issued
bundle --binstubs=./bundler_stubs

I then ran bundle install and 'which heroku' and now I got:
/home/tom/.rvm/gem/ruby-1.9.3-p194@rails328/bin/heroku

That was a change and so I thought geemus has done it:)

but when I ran 'heroku update' I got the same old message 'heroku update is only available from heroku toolbelt.'

Close :)

@geemus
Heroku member

@rubyshoes - glad it sounds like it is at least partially working now. I think gem uninstall rubygems_bundler would cause this behavior of automatically doing bundle exec to stop (if that is what you want). This in turn ought to prevent the non-toolbelt version from being run I think.

@rubyshoes

Hi geemus,

Currently I get this return to the 'which heroku' command that I run after I have commented out the heroku gem in my Gemfile:

/home/tom/.rvm/gems/ruby-1.9.3-p194@rails328/bin/heroku

is this where you would expect to see the bin file?

I know you have answered this indirectly ... but I just want to be sure that I have the correct path to the bin file.

@geemus
Heroku member

@rubyshoes - That looks like the correct bin file if you have installed heroku as a gem at the system level, yeah (toolbelt would look a bit different). Is it working for you now that you've made that change?

@rubyshoes

No ... it is not working. The only changes I have made is that I have commented out Heroku in my Gemfile.
I still use RVM since it would seem senseless to have to give up on RVM just to have an update function in Heroku.

I installed heroku ages ago from the console in my applications directory ... it never was a problem ... it is since we have this toolbelt thingy that the issue of Heroku Update has begun to appear.

What I do know is, that this is either a RVM problem, and they think not, or it is a Heroku problem, and they think not ... so it must be my problem ... and I think not.

I am looking around for some poor mutt to give it a kick:)

Ideally it would be great if you could give me some clarification as to what I need in my system to have Heroku Update work?

Just for your information the grey screen issue that I referred to in my earlier postings now has cleared up.
So Heroku is working in all of its functions but for one ... Heroku Update.

@Stevancw

It seems that if you have the heroku toolbelt then you do not need the gem?

@rubyshoes

Hey thanks Stevancw ... so do you think I should remove the Heroku gem? I will give it a try:)

@rubyshoes

Just as an update ... if I remove heroku .... namely: gem uninstall heroku ... I get unknown command heroku when I run 'Heroku Update'.

So I quickly re-installed heroku:)

@rubyshoes

geemus ... what would the bin file look like for toolbelt?

@rubyshoes

Well I gave it an honest effort and as David Deutsch keeps on reminding us in his "The Beginning of Infinity", 'problems are soluable', so I limp on ... the mutt just bit me!

@Stevancw
@rubyshoes

@Stevancw ... thanks for your help ... I have it commented out in my gemfile. Still have a problem though.

I was wondering if it has something to do with the path.

for instance, if I run 'whereis heroku'. I get a return of 'heroku: /usr/bin/heroku /usre/bin/x11/heroku'

and if I run 'env | grep PATH' I get a return of:

XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path

PATH=/home/tom/.rvm/gems/ruby-1.9.3-p194@rails328/bin: /home/tom/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/tom/.rvm/rubies/ruby-1.9.3-p194/bin: /home/tom/.rvm/bin: /usr/lib/lightdm/lightdm: /usr/local/sbin:/usr/local/bin: /usr/sbin: /usr/bin: /sbin: /bin: /usr/games: /opt/node/bin

I have spaced them out to see all the different paths.

MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
NODE_PATH=/opt/node:/opt/node/lib/nod_modules
GEM_PATH=/home/tom/.rvm/gems/ruby-1.9.3-p194@rails328: /home/tom/.rvm/gems/ruby-1.9.3-p194@global

I do not see any of the paths listed under 'whereis heroku' in the paths listed under the 'env | grep PATH' command.

The following link is a discussion about the heroku update and how they got it too work ... I am not sophisticated enough to figure it out.

http://stackoverflow.com/questions/11161820/heroku-toolbelt-breaks-rails

I did figure out how to display the paths on my system, but I am not sure which one is the system path that they discuss in the link. Also, how do you get to display which path 'heroku update' is using?
Maybe "which heroku", it does give me a path ... it is the gem path.

Maybe I have to include the toolbelt in the path somehow or exclude the heroku gem so that 'heroku update' finds the toolbelt instead of the gem?

Of course I did try 'which heroku toolbelt' and it gave me the same gem path that I list above, but I am not sure if it is just reading 'which heroku'.

If you find yourself throwing your hands up in exasperation ... remember 'Problems are Soluable' , I forgot the proviso, "As long they are not in violation of the laws of physics".

Thanks for your time and patience.

@rubyshoes

I was just reading the technical details for heroku toolbelt:

The install script will add our repository and key to your apt sources and then have apt install the heroku and foreman packages from it. The heroku command line client will be installed into /usr/local/heroku and the executable will be symlinked as /usr/bin/heroku.

I do not have a /usr/local/heroku .... maybe this is the problem?

@geemus
Heroku member

@rubyshoes - could be. At this point (with it removed from the Gemfile). I would run gem uninstall heroku and select all. Then do a fresh download/install from https://toolbelt.heroku.com. I know you did something quite similar before without much luck, but I think the Gemfile was the complicating factor then, so if we get that out of the way I think this should get you to a clean slate.

@rubyshoes

Ok ... I found a discussion about removing heroku toolbelt ... I could not remove it.

the solution was:

sudo apt-get remove heroku ( see the url below)

https://github.com/heroku/toolbelt/issues/10

then I re-installed heroku toolbelt as per heroku.

No joy ... lol ... the flag this time is:

'To update this version of the heroku client please use "apt-get install heroku-toolbelt"'

I did just that to no avail.

I forgot to mention that I had removed the heroku gem and 'which heroku' returns "/usr/bin/heroku"

So my guess is that we are running the toolbelt version of heroku here.

Everything else works though, just as it did in the past:)

@geemus
Heroku member

@rubyshoes - it sounds like it is using the toolbelt now (progress!) even if it doesn't support update. Yeah, on unix update defers to apt-get (it works in a different way on mac and windows). So thats the best its gonna get, apt-get should get you the latest (if there is newer stuff) in the future.

@jgentes

Looks like this happens again with the latest update on Windows 7.

@ddollar

@jgentes What is happening? The specific error from the top of this issue? Could you paste here the command you are running and the error you are seeing.

@jgentes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment