`container:init` is not a heroku command - heroku

I have installed heroku with homebrew in my OSX El Capitan(10.11.5) and installed the heroku-container-tools with:
heroku plugins:install heroku-container-tools
The installation goes successfully:
Installing plugin heroku-container-tools... done
When I run a heroku version, I got this:
heroku-toolbelt/3.42.22 (universal.x86_64-darwin15) ruby/2.0.0
heroku-cli/5.2.20-9d094b0 (darwin-amd64) go1.6.2
=== Installed Plugins
heroku-container-tools#3.0.0
But when I run a heroku container:init I got this:
! `container:init` is not a heroku command.
! See `heroku help` for a list of available commands.
Running heroku help container I got this:
Usage: heroku container
Use Docker to build and deploy Heroku apps
Use Docker to build and deploy Heroku apps
Additional commands, type "heroku help COMMAND" for more details:
container:login # Logs in to the Heroku Docker registry
container:push [PROCESS] # Builds, then pushes a Docker image to deploy your Heroku app
I am following this heroku tutorial: https://devcenter.heroku.com/articles/local-development-with-docker
In the tutorial is said to run heroku container:init
This command was replaced but some other and heroku did not updated their documentation or I have some problem installing the plugin?

Yes, they restricted access to their container registry, just read the warning on top of the tutorial you're following https://devcenter.heroku.com/articles/local-development-with-docker
heroku container:release, which creates a Heroku-compatible slug and
deploys it to Heroku, has been deprecated. For access to our container
registry (available in private beta), please contact
docker-feedback#heroku.com
now there are only login and push commands. I hope you can easily ask for the access.

Related

Heroku - Run Heroku CLI commands from web dashboard

Is it possible to run heroku-cli-commands like heroku regions from the Heroku Dashboard?
I tried to run those in the console, but it did not work..
From the heroku explanation page, as well as the appearance of the console, it seems that you can only run commands that start with heroku run (Example: npm start).
That means you can run commands there for the app, and heroku will pass them to it. Like you could run if the app was running on your computer. But do not run regular heroku cli commands, for example install an add-on, through the dashboard on the website, but only through heroku cli

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.

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.

Setting up Heroku for Neo4J

When I use the command heroku addons create:graphenedb --version v195. It gives error "No app specified , Run this command from an app folder or specify which app to use." I am new to Heroku and I do not understand which app folder it is talking about.
If you're not in your project folder or if it doesn't have a git remote to point it to Heroku you need to use the --app flag for the heroku command to specify the name of your app on Heroku

how to setup postgres db in Heroku

I'm totally new to Heroku and Postgres and I'm trying to figure out how to setup and access the Postgres db in a Heroku Ruby app.
I'm not sure how to go about setting this up. I've found some information about using the command:
rake db:create
Where do I enter this command? I'm completely in the dark on this.
Any help with how to setup/access the Postgres db in Heroku would be greatly appreciated.
Thanks.
Without info on what type of Ruby app you're building, what gems you may be utilizing, or what frameworks you may be building on, it is impossible to completely guide you through how to connect your Ruby app to the Heroku Postgres database. But here are a few things to point you in the right direction:
Install the Heroku Toolbelt as #jordan.baucke suggested. Beyond just adding plugins, you'll be using this toolbelt for nearly every Heroku-related action. Just follow the link, download, and install. Easy!
Now that you have the toolbelt, login to your account from the command line: heroku login.
Now make your app. While in your app folder (on the command line), execute: heroku apps:create <app name> -s cedar.
Now add the Postgres db: heroku addons:add heroku-postgresql:dev -a <app name>
From Ruby, you can connect to the db through the environment variable: ENV['DATABASE_URL'].
Deploy the app via git: git push heroku master.
From here, we really can't give you any further guidance since we don't know how you're interfacing with Postgres. But the above steps should at least get you to be able to connect to the db from your Heroku app.
For starters, are you using the the Heroku toolbelt? (command line tools?)
You can do it from the website as well, but with the toolbelt, you can enter heroku addons:add heroku-postgresql:dev --app *your app name*
Heroku will automatically inject the database into your app's database.yml when you deploy your app into Heroku.
Finally, you need to migrate the production database to your current migrations. You can do this remotely with the toolbelt again:
$ heroku run rake db:migrate
This will remotely connect a console and pull your migrations into your production database on the server.

Resources