error: cannot install "heroku": snap not found - heroku

I am following the instructions from official heroku website to install heroku on my ubuntu 14.04.
First I installed snapd on ubuntu and then tried to install heroku by running:
sudo snap install heroku
But I am getting following error
error: cannot install "heroku": snap not found
I posted this question on askubuntu but it wasn't of much help. Could somebody please help how can I fix this issue ?

To install heroku in all currently supported versions of Ubuntu open the terminal and type:
sudo snap install --classic heroku
This installs the heroku snap package successfully, and it is the recommended way of installing Heroku CLI in Ubuntu at the Heroku Dev Center website. When this was posted sudo snap install --classic heroku installs the latest version of Heroku.

Related

How do I install Heroku CLI on Termux?

Termux is a Linux terminal emulator for Android. I want to install the Heroku CLI to be able to manage my Heroku apps on the go, I tried typing heroku to prompt the error message and link to the right package, but it gives me:
No command 'heroku' found, did you mean:
Command 'heyu' from package 'heyu'
I tried installing the CLI from the official website, but that didn't work out as well. What should I do?
Use the npm package heroku, its the complete CLI as what you find from the official website. Simply do
npm i -g heroku
Alternatively, you may use yarn. Install yarn by doing
pkg install yarn
and then install the Heroku CLI by
yarn add global heroku-cli#latest

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

Migrating from a Shared Database to Heroku Postgres /

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.

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.

Any other ways to install Heroku except gem install

gem install heroku failed with following message and I have tried the solution here, but it failed also. Is there any other way I can install Heroku?
WARNING: RubyGems 1.2+ index not found for: http://gems.rubyforge.org/
RubyGems will revert to legacy indexes degrading performance.
ERROR: could not find gem heroku locally or in a repository.
Heroku now offers a standalone client, called the Heroku Toolbelt. Check out https://toolbelt.heroku.com/ for current installation instructions.
you should be able to bypass the problem by downloading the heroku gem from rubygems.org and install from the local copy.
go to http://rubygems.org/gems/heroku and click the download link to download version 1.8.5
then move into the download folder and do a gem install --local heroku-1.8.5.gem ,but follow the instruction to install the dependency first
Updating the gem to version 1.3.6 seem solve the problem.
However, gem update --system does not work on Ubuntu platforms, and apt-get install rubygems1.8 always bring you to version 1.2.0.
Here is the trick to update your gems to latest one,1.3.6, by the time of writing:
sudo gem install rubygems-update
sudo update_rubygems
And the credit goes here.
Finally, by all means avoid installing the gems manually, my experience taught me.
Seems like your Rubygems version is not up to date.
Try sudo gem update --system and/or sudo gem install rubygems-update; sudo update_rubygems before trying to install the heroku gem.
Alternately, if you're running Debian and cannot use gem update --system, try installing a version of rubygems that is >1.2 from backports. I used aptitude -t lenny-backports install rubygems and then rubygems could actually access the online repository.
To install Heroku in all currently supported versions of Ubuntu open the terminal and type:
sudo snap install --classic heroku
This installs the heroku snap package successfully, and it is the recommended way of installing Heroku CLI in Ubuntu at the Heroku Dev Center website. When this was posted sudo snap install --classic heroku installs the latest version of Heroku.

Resources