Changing Heroku version from gem to toolbelt - heroku

I have downloaded the Heroku toolbelt a few times but whenever I run
heroku version
I am getting
heroku-gem/1.6.3
I have tried to uninstall the heroku gem but I can't seem to use the heroku toolbelt. What's the correct process to use the toolbelt?
Thanks!

it's likely coming from a Gemfile that is including the heroku gem. Remove it from there.
Alternatively you could include the toolbelt higher in the PATH environment variable than your ruby gems.

I was having the same problem, this what I did:
Install the heroku-toolbelt from the webpage.
go to /usr/local/heroku/bin and run ./heroku version this will throw the version of the current bin, problably this is the version you want to use.
run which heroku this will throw you a path, if the path is diferent that /usr/local/heroku/bin then just: rm -rf path
restart your console/terminal run heroku version
if dosn't work probably you need to add /usr/local/heroku/ to your $PATH.
restart and thats all
I was using oh-my-zshell with the heroku plugin which gave me the error and this is how i solve it, hope work for you.
#UPDATE
I restart and suddenly I had the same error again :/ and I fixed by:
gem uninstall heroku and rbenv rehash

Related

Switch from heroku gem to heroku-api topolbelt

Heroku is so good at making things simple...but this...not so much. How do you switch from the heroku gem to the new tool belt? Here are the steps I have taken:
$ heroku version: heroku-gem/2.32.5 (x86_64-darwin11.4.1) ruby/1.9.3 autoupdate
removed 'gem "heroku"' from gem file
added 'gem "heroku-api"' to gemfile
deleted gemfile.lock
$ bundle install
installed toolbelt via the package installer
$ heroku login ... returns "Authentication successful"
$ heroku version: STILL RETURNS heroku-gem/2.32.5 (x86_64-darwin11.4.1) ruby/1.9.3 autoupdate
Two questions:
#1 Why is my version still using the heroku-gem after taking the steps above?
#2 Where do I put "heroku = Heroku::API.new(:api_key => API_KEY)" for use with the heroku-api gem?
Deleting the gemfile.lock file didn't cut it. I had to run gem uninstall heroku (which I had 9 version of)... After that, heroku version showed to tool belt.

Installing heroku client only, and not the other things

I am using RVM for my Ruby installations.
I recently encountered a problem installing the heroku toolbelt with it installing Ruby 1.9.1 on my actual system, which then rewriting environment variables, and breaking my ruby cli. I had to delete everything, reinstall RVM, reinstall gems, ect ect..
The point is, I wish to be able to use the heroku client, and possibly foreman, but I don't want the toolbelt trying to install git, and ruby 1.9.1 on my system.
I tried to do the gem install version, but it states that the gem is depreciated, and for me to install the toolbelt.
Any help will be greatly appreciated.
Thank you for all thoughtful answers.
Go to the Heroku CLI on github and download the tarball from the other setup. Extract the Tarball and move the resulting files under /usr/local/heroku. Add /usr/local/heroku/bin to your PATH. Ensure that Heroku gem is removed from any project gem files. Reload your terminal and the Heroku CLI should be working.
You can run which heroku from your project directory and you should get /usr/local/heroku/bin/heroku.
As it is self updating you should only need to do this once.
If you want Foreman just use the Gem version.
Git and Ruby will not be installed using this process.
Update: Heroku now have an install script for a standalone install of the Heroku Client without Foreman and Git.
On Windows, the Heroku Toolbelt installer offers a choice between Full Installation and Custom Installation. If you choose Custom, you can select which components you want to install.

How do I replace the Heroku gem with Heroku Toolbelt?

I know that there are closely related question to mine but they did not help me.
I'm learning the whole rails, gem, git, heroku concept and liking it a lot.
When I issued heroku command line actions (Ubuntu linux) I received warnings that the gem was deprecated and I should install the toolbelt.
I ran the full wget install of the tool belt:
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
But now when I use the heroku command line I still get the deprecated warning.
I suspect I have to get rid of the heroku gem but I'm not sure how to do that ? I want to be sure to do it correctly so it's not later loaded again via bundler.
Thank you.
The uninstall command will remove any gem. In this case, you want to use the following:
gem uninstall heroku
I had issues getting Toolbelt to work. I am running OSX so my solution may not work for your Ubuntu linux setup. I still thought I might share just in case. Here are the steps I used to get it to work:
Remove the heroku gem by running gem uninstall heroku. It did ask if I wanted to remove executables: heroku. Be sure to choose yes.
Go to [https://toolbelt.heroku.com/][1] and download / install the Toolbelt app.
On the Toolbelt page it mentioned that /usr/local/heroku/bin will be added to your PATH. I was not seeing this and was not sure if it is becuase I am running zsh instead of bash. I went ahead and opened my .zshrc file and added it to my PATH.
You probably just need to relaunch your shell.
This worked for me: (be sure to choose yes when it ask if you want to remove executable: heroku)
gem uninstall heroku --all
Source (last comment): http://johntwang.com/blog/2011/09/13/remove-heroku-toolkit/

Toolbelt install: Could not find gem Heroku

I get an "Could not find RubyGem heroku (Gem::LoadError)" when I try to execute any Heroku commands from terminal in my app directory. Have tried wiping and reinstalling Toolbelt, as well as any previously installed Heroku gems.
Using the full path works and--app name works (/usr/bin/heroku config--app myapp-stage). Using OS X 10.8.1.
echo $PATH
/Users/johndoe/.rvm/gems/ruby-1.9.3-p194#llctlc/bin:/Users/johndoe/.rvm/gems/ruby-1.9.3 p194#global/bin:/Users/johndoe/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/johndoe/.rvm/bin:/Users/johndoe/.gem/ruby/1.8/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/bin/heroku:/opt/local/sbin:/opt/local/bin:/usr/local/mysql/bin:/Users/johndoe/.ec2/bin:/usr/local/git/bin
$ heroku
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem heroku (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /Users/johndoe/.gem/ruby/1.8/bin/heroku:18
Thanks in advance for any help or advice.
I had the same problem.
Uninstall the Gem gem uninstall heroku (Select 'All Versions').
Find your Ruby 'bin' path by running gem env (it's under 'EXECUTABLE DIRECTORY:')
cd to the bin folder.
Remove the Heroku executable rm heroku
Restart your shell (close Terminal tab and re-open)
Hit heroku version, you should now see something like:
heroku-toolbelt/2.33.1 (x86_64-darwin10.8.0) ruby/1.9.3
Now you can heroku login as per their instructions and get back to hacking :)

Heroku update says I don't have the toolbelt

I have a Rails project that is using heroku_san for deployment. I wanted to give heroku's new toolbelt a shot, so I installed it on my system, which is a Mac Os X, and ran heroku upgrade and I am getting this message:
heroku update is only available from Heroku Toolbelt.
Download and install from https://toolbelt.heroku.com
I already have it installed, though.
The following steps worked for me:
download and install toolbelt: https://toolbelt.heroku.com/
in terminal, "gem uninstall heroku", and then choose "all versions" if you have multiple.
you mentioned you have a gem that depends on the heroku gem, so I'm not sure what to tell you besides to try to eliminate that dependency.

Resources