Migrating from a Shared Database to Heroku Postgres / - heroku

ON MAC OS X 1.7.2
I tried following the instructions https://devcenter.heroku.com/articles/migrating-from-shared-database-to-heroku-postgres
So I tried running the command on my-app:
$ heroku addons:add heroku-postgresql:dev -a my-app
-----> Adding heroku-postgresql:dev to test-biowatts... failed
! You're running an outdated version of the Heroku gem/toolbelt that cannot perform the requested action. Please update your client and try again.
So I tried to update Heroku
$ heroku update
! update is not a heroku command. See 'heroku help'.
Where
$ heroku version
heroku-gem/2.4.0
QUESTION UPDATE 1 - Heroku update now gives a different message
$ heroku update
! `heroku update` is only available from Heroku Toolbelt.
! Download and install from https://toolbelt.heroku.com
so I downloaded and installed toolbelt but the heroku update still gives the same message
QUESTION UPDATE 2 - Removed heroku installed TOOLBELT - RESOLVED
sudo rm -rf /usr/local/heroku
sudo rm -rf /usr/bin/heroku
gem uninstall heroku
then installed https://toolbelt.heroku.com/
Restarted terminal
AND IT WORKED!
Cheers,
joel

Have you tried gem update heroku?
If you are using Mac OSX mountain lion. Maybe you should better use heroku toolbelt. I had almost same issue, and it fixed after I installed Heroku toolbelt.

Related

The heroku cli fails

I run
heroku logs
and get
'ENOCOMMANDS': semver has no commands. Is this a CLI plugin?
Is there a problem with the current version of heroku? I have searched for both ENOCOMMANDS and semver with no useful results.
I had the same issue. I fixed it by uninstalling and then installing heroku like this...
$brew uninstall --force heroku
$rm -rf ~/.local/share/heroku ~/.config/heroku ~/Library/Caches/heroku
$brew install heroku

Heroku run shows update, is it necessary to update ? And if yes than how?

heroku run rails console
▸ heroku-cli: update available from 6.11.17 to 6.14.16-9ae58fc
▸ No app specified
How do I update my heroku-cli version?
You are not obligated to update. I am using a previous version as well, and everything works fine.
But if you want to update check this link: https://devcenter.heroku.com/articles/heroku-cli
It says that to update your heroku cli you just have to do this:
heroku update
But there is this issue:
Not all methods of installation are updatable with heroku update. Apt users will have to use sudo apt-get update && sudo apt-get upgrade heroku. npm/yarn users will have to update with npm upgrade -g heroku-cli or yarn global upgrade heroku-cli
If updating does not update the CLI, try uninstalling with the uninstall instructions below
heroku update
did not work for me. I had to run:
sudo apt update && sudo apt install heroku
in order to get an update.
Uninstall Heroku by using command:
sudo apt-get remove Heroku
Then install Heroku by:
sudo apt-get install heroku
Now check Heroku version:
heroku -v
I am using Windows 11 and heroku update is working properly.
Remember to run this command in the terminal as an administrator.
This is how I updated:
npm update -g heroku

Heroku CLI suddenly broken

Suddenly, from one command to the next, the Heroic CLI stopped working. No matter what I type into the command line, I get the same error. See below.
$heroku help
▸ commands is not a heroku command.
▸ Perhaps you meant domains
▸ Run heroku help for a list of available commands.
! error getting commands pid 24643 exit 127
What the heck is going on?
this problem just happened with me after the last update of heroku CLI,
heroku CLI check if there is updates after execute any command related with and when run updates the problem occurs because is not working with root permissions.
to fix this you need to reinstall heroku CLI
sudo apt-get remove heroku
sudo add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
curl -fL https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install heroku
and you probably need to add this path
PATH=$PATH:~/usr/bin
export PATH
This just happened to me. I fixed it by removing the heroku app the same way i installed it. I had the gem installed, so i uninstalled that.
gem uninstall heroku
Then i used homebrew to reinstall it.
brew install heroku
and it worked.
Something similar (although with a different error message) happened to me after updating my OS. On a Mac, make sure to install the CommandLineTools (with Xcode) after a major OS update!

Heroku CLI install failing Mac OSX

Randomly my heroku toolbelt stopped working. I'm not sure why, but when I execute any heroku action, for example heroku -v this happens:
➜ Homebrew heroku -v
heroku-cli: Adding dependencies... 2.57 MB/2.57 MB
2016/04/26 12:13:42 running npm from /Users/cowan/.heroku: /Users/cowan/.heroku/node-5.10.1-darwin-amd64/node /Users/cowan/.heroku/npm-3.8.5/cli.js -v --loglevel=info
ERROR: expected npm to equal v5.10.1
Note this particular example is after I used homebrew to uninstall and reinstall heroku.
Solution in 2 steps:
Fresh install from https://toolbelt.heroku.com/osx
Restart bash/zsh

How to Download Heroku on mac

I have been trying to download Heroku software to upload the rails app I made but every time I try to download it, it says it failed.
And what version of heroku should I be downloading?
if you have installed node and npm already, try this
npm install -g heroku
if you're using Homebrew, try this
brew tap heroku/brew && brew install heroku
once the installation is done, issue this to verify whether you've successfully installed Heroku on your Mac
heroku --version
You need to set up your local workstation with the Heroku command-line client and the Git revision control system by installing the Heroku Toolbelt. Check out this link to download Heroku toolbelt.
Heroku is a hosting service and there is nothing to download. You can sign up at Heroku.com and there are instructions on the site for how to upload your app.

Resources