Installing Heroku Toolbelt has broken Taps
Asked Answered
P

4

6

I've been hapilly using the Heroku and Taps gems for a while now, regularly doing a heroku db:push to push my database up to production.

This morning I noticed a message that the Heroku gem was deprecated, having been superseded by the Heroku Toolbelt. So I uninstalled the gems and installed the Heroku Toolbelt.

The next time I went to push my database I got the following error:

!    Taps Load Error: cannot load such file -- taps/operation
!    You may need to install or update the taps gem to use db commands.
!    On most systems this will be:
!    
!    sudo gem install taps

Both Heroku and Taps are correctly installed, but in frustration I've tried following the instructions ('install or update the taps gem to use db commands') without success. The (re)install goes fine but I still get the above error when I try and push the database. Can anyone suggest a fix? I'm using rbenv.

Pelican answered 21/10, 2012 at 19:7 Comment(4)
What problems and errors messages did you encounter when you ran sudo gem install taps?Cosmopolitan
No problems or errors. Taps and Heroku both installed fine.Pelican
I don't understand. In your question you said "I've tried following the instructions but without success."Cosmopolitan
@Cosmopolitan Sorry. I have edited the question for clarity. The install / reinstall works fine, without errors, but the original error still occurs. The problem isn't that anything is uninstalled. Both Taps and Heroku are installed, so I think the error suggesting a reinstall of Taps is a red herring.Pelican
P
8

Well I uninstalled the toolbelt using commands from here:

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

Then removed the following from my .bash_profile

### Added by the Heroku Toolbelt

export PATH="/usr/local/heroku/bin:$PATH"

And it works again.

Moral of the story - avoid the Heroku Toolbelt and stick to the gems.

Pelican answered 21/10, 2012 at 21:15 Comment(5)
i really dislike that heroku is deprecating the gem. i don't want to user their toolbelt, f****n sake!Crape
@Crape Agreed. If you're going to force me to use something, make sure it isn't bust.Pelican
Gems are not maintained since end of the year. Use toolbelt.Goldi
@Goldi Toolbelt is really buggy. It's not as simple as that.Pelican
@Pedr Why buggy? Yes, taps don't work, but they're deprecated for other reasons too.Goldi
D
1

Can you try PG Transfers plugin for Heroku, documentation is on the page itself.

https://github.com/ddollar/heroku-pg-transfer

This seems to be recommended approach now by Heroku.

Derinna answered 22/10, 2012 at 11:24 Comment(2)
That looks like a barely-used gem. Where does Heroku recommend using it?Pelican
I never seen any Heroku's recommendation too. However the author (ddollar) works for Heroku and is well-known for his contribution to Ruby community. Foreman created by him is included in the Toolbelt. Generally, David's plugins to Heroku are always worth considering.Goldi
T
0

You don't have to remove toolbelt to use a gem version for one off cases such as broken taps:

% gem install heroku
% $(rbenv root)/shims/heroku version
heroku-gem/2.35.0 (x86_64-darwin12.2.0) ruby/1.9.3

This is using rbenv, but rvm, chruby or the like should be similar.

Tini answered 20/3, 2013 at 16:16 Comment(0)
G
0

Well, Heroku suggests using PG Backups add-on. Taps+Heroku combination make problems to many, partially because Taps is designed to produce database-agnostic dumps which is not that easy.

The disadvantage is you got to upload your dump to S3 or something.

Goldi answered 19/4, 2013 at 17:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.