Heroku recommends switching from the old gem to the new "Heroku Toolbelt":
https://blog.heroku.com/archives/2012/10/15/upgrading-to-the-heroku-toolbelt
I ran these commands successfully:
$ sudo gem uninstall heroku
$ sudo gem uninstall heroku --all
$ wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
Then I restarted my terminal, and... I still have the old version:
$ heroku version
heroku-gem/2.33.5 (x86_64-linux) ruby/1.9.3
$ heroku fork
! `fork` is not a heroku command.
$ which heroku
/home/me/.rvm/gems/ruby-1.9.3-p362/bin/heroku
What did I forget?
Similar questions:
How do I replace the Heroku gem with Heroku Toolbelt? but none of the answers work
Heroku toolbelt fails update and rails/heroku migrating from gem to toolbelt but I have no ~/.heroku/client folder
It looks like you still have the gem installed in one of your rvm installations.
Try removing the gem without sudo:
gem uninstall heroku
The value of which heroku should not be in the ~/.rvm folder, but /usr/local.
Related
Tried to install Heroku Toolbelt but now I get a Gem:LoadError error when trying to issue any heroku command.
$ heroku -v
/Users/xyz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
`to_specs': Could not find heroku (>= 0) amongst [...]
(Gem::LoadError)
$ which heroku
/Users/xyz/.rvm/gems/ruby-1.9.3-p194#global/bin/heroku
It seems it's still seeking the gem, but I already uninstalled it. How can I fix this?
(OSX Mountain Lion)
I might be misunderstanding the issue, but if it is just that the heroku gem is not installed/missing try:
$ gem install heroku
I had the same issues initially with ROR on Windows/OS X.(Everyone suggested me to move to LINUX/UNIX)
Rather than installing the Heroku Toolbet (which breaks ruby and rails which is already installed) install the heroku gem along with foreman gem.
gem install heroku
gem install foreman
Then you can use it easily.
I get the following error message:
heroku db:pull --debug postgres://USERNAME:PASSWORD#localhost/test
Loaded Taps v0.3.23
Warning: Data in the database 'postgres://USERNAME:PASSWORD#localhost/test' will be overwritten and will not be recoverable.
Receiving schema
Unable to fetch tables information from http://heroku:foo9dsfsdfsdb465ar#taps19.heroku.com. Please check the server log.
The command above does not produce any messages in the log that can be viewed using 'heroku logs'.
Any idea what I am doing wrong?
Use pgbackups instead of taps/db:pull
http://devcenter.heroku.com/articles/pgbackups
I answered to similar problem here:
Unable to fetch tables information when running heroku db:pull
I found some kind of work-around.
I have the same problem with my SHARED_DATABASE on heroku
ruby 1.9.2
gems:
pg (0.11.0)
heroku (2.32.4)
heroku-api (0.3.5)
taps (0.3.24)
heroku db:pull ended with:
Unable to fetch tables information from http://...#taps19.heroku.com. Please check the server log.
I switched to ruby 1.8.7 using rvm and heroku db:pull works fine.
Back again to ruby 1.9.2 to develop my application.
I hope this help someone until db:pull will be fixed with ruby 1.9.2.
Was able to get it going by reverting back to ruby 1.9.3 and Rails 3.1.0.
Here are some instructions on how to do that with rvm:
$ rvm install 1.9.3
$ ruby -v
$ rvm use 1.9.3-p286
$ rvm gemset create rails310
$ rvm 1.9.3-p286#rails310
$ rails -v
$ gem install rails -v 3.1.0
$ rvm gemset list
$ heroku db:pull –app <yourapp>
$ gem install taps
$ gem install sqlite3
$ heroku db:pull –app <yourapp>
More reading on rvm can be found here: http://rvm.io/gemsets/basics
I've got a fairly pesky problem I can't seem to get to the bottom of. I just switched from rvm to rbenv, and now I'm having a problem with the Heroku client.
Basically, there's an old version of Heroku living somewhere in the system and rbenv is not aware of it, but it is overriding any newer version of the heroku client I install. This is a problem because I need the new version of the heroku cli to run cedar commands...
Here's and example from my shell of what's going on:
~ » gem uninstall heroku
INFO: gem "heroku" is not installed
~ » which heroku
heroku: aliased to nocorrect heroku
~ » rbenv which heroku
rbenv: heroku: command not found
~ » gem install heroku
Fetching: heroku-2.17.0.gem (100%)
Successfully installed heroku-2.17.0
1 gem installed
~ » which heroku
heroku: aliased to nocorrect heroku
~ » heroku version
heroku-gem/1.12.1
~ » rbenv which heroku
/Users/Andrew/.rbenv/versions/1.9.2-p290/bin/heroku
~ » gem list heroku
*** LOCAL GEMS ***
heroku (2.17.0)
~ » heroku version
heroku-gem/1.12.1
~ »
I don't know where the old version of Heroku is, how to get rid of it, or (most importantly) why it is lingering in my system and overriding the rbenv-specific newer gem.
Any suggestions?
Well, it took me a while but I was able to track this down. It turns out that I had used the heroku gem a long time ago (before I was even using RVM), and while RVM had been hiding the old gem, RBENV did not. I found this using:
sudo find / -type d -name "*heroku*"
This revealed that I had some old gems living in the system ruby folder:
Library/Ruby/Gems/1.8/...
I cleaned out all the subfolders under that, and that fixed my problem.
I am new to programming and trying to understand this error. The error is really strange because I have already installed the heroku gem (using sudo and not using sudo). I am using OS X.
skline-mac:~ skline$ sudo heroku keys:add
/Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:861:in `report_activate_error': Could not find RubyGem heroku (>= 0) (Gem::LoadError)
from /Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:255:in `activate'
from /Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:1204:in `gem'
from /Users/skline/.rvm/gems/ruby-1.9.2-p136#rails3tutorial/bin/heroku:18:in `<main>'
You're using rvm, so there's no need for sudo, either for gem install heroku or using the heroku gem. This should work without any use of sudo:
gem install heroku
heroku keys:add
If this does not work, try resetting the ownership on your .rvm directory to your own user account (because you used sudo at some point in the past):
sudo chown -R $USER:staff ~/.rvm
When I try to run heroku console I get the following error:
user#omnipresent:~/rails/demo$ heroku console
! This version of the heroku gem has been deprecated.
! Please update it by running: gem update heroku
When I do the update..it says there is nothing to update!
user#omnipresent:~/rails/demo$ gem update heroku
Updating installed gems
Nothing to update
Following are my versions:
user#omnipresent:~/rails/demo$ heroku version
heroku-gem/1.5.2
user#omnipresent:~/rails/demo$ ruby -v
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
user#omnipresent:~/rails/demo$ rails -v
Rails 2.3.5
running heroku list shows following:
user#omnipresent:/usr/bin$ gem list heroku
*** LOCAL GEMS ***
heroku (1.8.5, 1.8.3, 1.8.0, 1.5.2)
Even though I already had 1.8.5...I guess installing it again forces the class cache update.
user#omnipresent:~/rails/seconddemo$ sudo gem install heroku
Successfully installed heroku-1.8.5
1 gem installed
Installing ri documentation for heroku-1.8.5...
Updating class cache with 3098 classes...
Installing RDoc documentation for heroku-1.8.5...
user#omnipresent:~/rails/seconddemo$ heroku console
Ruby console for myapp.heroku.com
>>