"heroku run" gives error "CERT_HAS_EXPIRED: certificate has expired" - heroku

I get this error trying to run commands on Heroku:
$ heroku run pwd -r heroku
Running pwd on ⬢ my-app-name... !
▸ CERT_HAS_EXPIRED: certificate has expired
I also get this error attempting to open a console with heroku run rails console.
Any ideas? It did not help to update the CLI, or to log out from the CLI and back in.

Seems Heroku have an ongoing incident related to this: https://status.heroku.com/incidents/1236
Presumably they will fix it.

I am also getting CERT_HAS_EXPIRED: certificate has expired on running heroku run rails console
I tried with following lines, now its fixed.
heroku run:detached "heroku run rails c" -a app_name
heroku run rails c --app app_name
Now the issue https://status.heroku.com/incidents/1236 has been resolved.

Related

How to schedule PostgreSql procedure using Heroku scheduler?

I am trying to schedule PostgreSql procedure using Heroku scheduler. I tried heroku pg:psql -c "call procedure_name();" --app app-name but gets the error from scheduler "bash: heroku: command not found"
That error is telling you important information. The Heroku CLI is not present in your environment, so bash complains that heroku isn't a command that it recognizes.
If you want to run heroku commands from your application you'll need to include the cli buildpack when you build your application to make sure it's properly bundled. Once you've included the buildpack and triggered a new build, this should work.

Cannot use the following command: "heroku create"

heroku create error
I'm trying to learn ruby on rail and I followed the heroku steps to the t.
when I enter "heroku create" i get the error message in the img.
I had the same error on Windows. I guess my installed version of the Heroku CLI was outdated because all I did was uninstall and reinstall the Heroku CLI and everything is working again.

Heroku CLI error - "cli.Spinner is not a function"

I am getting the following message when I try to load a rails console in heroku:
→ heroku run rails console -a myapp
▸ cli.Spinner is not a function
Output from checking heroku version:
→ heroku --version
heroku-toolbelt/3.42.47 (x86_64-darwin10.8.0) ruby/1.9.3
heroku-cli/4.29.3-7996295 (amd64-darwin) go1.6
=== Installed Plugins
heroku-apps#1.7.3
heroku-cli-addons#0.3.0
heroku-fork#4.1.2
heroku-git#2.4.5
heroku-local#5.0.1
heroku-orgs#1.0.5
heroku-pg-extras
heroku-pipelines#1.1.3
heroku-run#3.1.1
heroku-spaces#2.1.2
heroku-status#2.1.2
It has worked for me in the past but now I get this error. I've reinstalled the Heroku CLI using both the Heroku provided package and with brew install heroku. I am able to use the CLI for logs with heroku logs -a myapp. Any thoughts about what might be the issue?
You can fix this by removing your ~/.heroku directory and running heroku update. If you have manually installed plugins you will have to manually reinstall them.
This solution actually works in linux. A friend next to me have the issue, and we just remove the ~/.heroku and run heroku again, because all the files were deleted is just install all the updates.

Running bash on heroku won't work

I am trying to run bash on heroku to test it out and it is failing
$ heroku run bash
▸ Error: No app specified
▸ Usage: heroku run --app APP
▸ We don't know which app to run this on.
▸ Run this command from inside an app folder or specify which app to use with --app APP
▸
▸ https://devcenter.heroku.com/articles/using-the-cli#app-commands
$ heroku run --app bash
▸ Usage: heroku run COMMAND
▸
▸ Example: heroku run bash
So, the example says heroku run bash will work but it doesn't. I have no dynos running. I feel I am missing something basic here...
Try run commands:
First you need to login, then you to see your apps and finally run bash
heroku login
Insert you user and password
heroku apps
=== user#gmail.com Apps
myaplication
then look at the list apps and write
heroku run bash --app myaplication
You could also do this:
get app name using;
heroku apps
then set heroku remote;
heroku git:remote -a yourappname
and finally run bash on/in your app
heroku run bash
I think you have two issues.
Firstly, you need to run bash within some app. You can either specify the app via the --app key as the help actually says or you can run this command inside the folder which has a heroku app initialized already. For connecting the folder to a heroku app - see this answer How to link a folder with an existing Heroku app.
Second, running a bash actually takes away one dyno from your app. So you need to have at least one dyno.
Try this command:
heroku pg:psql -a appname

heroku run bash is not working

Why is heroku run bash not working?
$ heroku login
Enter your Heroku credentials.
Email: xx#yy.zz
Password (typing will be hidden):
Logged in as xx#yy.zz
$ heroku run bash
▸ No app specified.
▸ Run this command from an app folder or specify which app to use with --app APP
$ heroku run --app bash
▸ Usage: heroku run COMMAND
▸
▸ Example: heroku run bash
$ heroku run "ls /usr/bin/"
▸ No app specified.
▸ Run this command from an app folder or specify which app to use with --app APP
$ heroku run --app "ls /usr/bin/"
▸ Usage: heroku run COMMAND
▸
▸ Example: heroku run bash
$ heroku version
heroku-toolbelt/3.42.22 (universal.x86_64-darwin15) ruby/2.0.0
heroku-cli/4.27.11-7569c5d (amd64-darwin) go1.5.2
=== Installed Plugins
heroku-apps#1.1.0
heroku-cli-addons#0.1.1
heroku-fork#4.0.0
heroku-git#2.4.4
heroku-local#4.1.5
heroku-run#2.9.2
heroku-spaces#2.0.9
heroku-status#1.2.4
As the error message indicates, you need to specify which heroku app you want to run commands on. (If you're in a git repository with a remote pointing to heroku, it will use that one by default; that's what it means by "from an app folder".)
$ heroku apps
will give you a list.
$ heroku run --app INSERT_APP_NAME_HERE bash
will run bash on that app.
This error is because of not specifying the app you want to use. Try this
$heroku app
example
$heroku run bash --app examp
need to manually specify the name of the image with the run
command like:
heroku run bash --type worker -a app_name

Resources