Heroku fails to detect Hugo app matching buildpack - heroku

I created a Hugo application which I wanted to deploy through Heroku.
Following Hugo's instructions on their github readme, it says to create a Heroku app with the command:
$ heroku create --buildpack https://github.com/roperzh/heroku-buildpack-hugo.git
followed by:
$ git push heroku master
$ heroku open
Upon doing so, however, I keep getting an error:
remote: -----> Failed to detect app matching https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/go.tgz buildpack
and the push ultimately fails.
Most of what I've looked up tells me that it needs a specification of what language is being used, which in this case is Go.
But even when doing:
heroku buildpacks:set -a myproject heroku/go
It tells me:
! The buildpack heroku/go is already set on your app.
So, if it's already set on my app, then why can't it detect an app matching the buildpack?

Check your hugo version using
hugo version
and then set your hugo version on heroku
for example 0.40
heroku config:set HUGO_VERSION=0.40 -a <your app name>

Related

Deploy heroku app not compatible with buildpack

When I try to deploy my app to heroku then I received:
App not compatible with buildpack: https://github.com/kr/heroku-buildpack-go.git
The steps that I follow are:
as mentioned in here, I created a project on heroku by using heroku create -b https://github.com/kr/heroku-buildpack-go.git command
then I run heroku config:set BUILDPACK_URL=https://github.com/kr/heroku-buildpack-go command to set buildpack again
then I tried to git push heroku master but I receive App not compatible with buildpack: https://github.com/kr/heroku-buildpack-go.git error
I also connected my GitHub account to heroku and tried deploy from master branch which was on GitHub. But I am still facing this error(App not compatible with buildpack: https://github.com/kr/heroku-buildpack-go.git)
How to solve it?
The reason here is because you should not use your git url as buildpack. https://github.com/mars/create-react-app-buildpack.git is the default. Try this:
heroku buildpacks:clear
heroku buildpacks:set mars/create-react-app

`container:init` is not a heroku command

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.

Getting PDFTK installed on heroku Cedar Stack for use in my app

so I have building management app, which locally uses the pdftk to generate pdf forms (prefilled with tenant/expense data). Works like magic on my local machine.
However, on Heroku I get the error:
pdftk executable /usr/local/bin/pdftk not found
in the logs when I try to generate the pdf file. I realize that I need to install pdftk on my heroku app using a buildpack. I've tried following some tutorials with Vulcan, but vulcan is deprecated and they say use heroku run, however I can't find much documentation of how to install the pdftk-source: https://github.com/millie/pdftk-source using heroku run.
I'm going to try https://github.com/millie/heroku-buildpack-ruby-pdftk, but if there is an easier/less messy way let me know, thanks!
EDIT:
Tried the above method, and now my heroku logs say:
RuntimeError (pdftk executable /app/vendor/pdftk/bin not found)
So I'm thinking the buildpack didn't include pdftk to begin with, which doesn't make sense.
I must be doing something wrong, but I followed the instructions exactly, only difference is I used dropbox instead of S3 to store the tar.gz file (the pdftk source)
EDIT:
OK, I figured out how to include pdftk executable in the heroku buildpack and upload it successfully as part of the app environment. HOWEVER, for some very strange reason, in the heroku bash console, when I cd into pdftk directory and try to run the executable, heroku bash says pdftk executable not found.
It works on my local machine, when cd into the pdftk directory and run pdftk, it runs the executable, so its not the executable..so why isn't it working inside the heroku bash directory?
SOLUTION:
Was missing setting LD_LIBRARY_PATH in my config vars on heroku, because pdftk relies on a library file. Also, remember to tar the tar.gz to the root directory and set a PATH to /bin/pdftk. Just check out #heroku on IRC, that's where I got my answer.
Was missing setting LD_LIBRARY_PATH in my config vars on heroku, because pdftk relies on a library file. Also, remember to tar the tar.gz to the root directory and set a PATH to /bin/pdftk. Just check out #heroku on IRC, that's where I got my answer.
This is how i setup pdftk in nodejs app in heroku
Create heroku app
heroku create
Set buildpack for pdftk
BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-apt
Set buildpack for nodejs
heroku buildpacks:add --index 1 heroku/nodejs
Add the libgcj.so.* to your search path:
heroku config:set LD_LIBRARY_PATH=/app/bin
Turn on at least one dyno
heroku ps:scale web=1
Create a Procfile in the root of your project and define the following:
web: node server.js
Push changes in heroku
git push heroku master
Adding answer that worked as of July 2019
Note: Thanks to shake-apps for creating the Buildpack https://elements.heroku.com/buildpacks/shake-apps/heroku-buildpack-pdftk
If you need to have PDFtk installed on Heroku for a Node JS Application, follow these instructions:
Heroku Installation
You'll need to set the base nodejs buildpack, and the pdftk buildpack by shake-apps.
Set them by running the following:
heroku buildpacks:set heroku/nodejs;
heroku buildpacks:add --index 1 https://github.com/shake-apps/heroku-buildpack-pdftk.git;
After build packs are set, the server can be deployed normally with
git push heroku master
If you have any issues with the deploy it could be your previous buildpack. You can clear it to start fresh with:
heroku buildpacks:clear

Heroku meteor/meteorite deployment

I have a meteor project created with meteorite under version control and I'm trying to deploy it to Heroku using the heroku buildpack oortcloud/heroku-buildpack-meteorite but I this error:
! Heroku push rejected, no Cedar-supported app detected
Is it a problem with the build package or I need extra configuration in my app?, It's the first time I deploy an App to heroku so I'm not very familiarized with it.
As I mentioned in the question I'm very new to Heroku and this time I made a silly mistake.
In the buildpackage documentation it says you just need to use heroku create --stack cedar --buildpack https://github.com/oortcloud/heroku-buildpack-meteorite.git command and then git push. What I did't realized was that the command creates a new app in heroku and I had mine created already.
So the solution is:
heroku config:add BUILDPACK_URL=https://github.com/oortcloud/heroku-buildpack-meteorite.git

Unable to push to heroku

Trying to push to heroku.
When I type: heroku create
getting this message.
! No account specified.
!
! Run this command with --account
!
! You can also add it as a git config attribute with:
! git config heroku.account work
Using Rails 3.1.1
Help would be appreciated.
Looks like you've installed the Heroku Accounts plugin which allows you switch between multiple heroku accounts - follow the instructions here https://github.com/ddollar/heroku-accounts to add an account for it to use
type in gem install heroku
Then upload rsa key of github to heroku
$ heroku keys:add
Uploading ssh public key /Users/adam/.ssh/id_rsa.pub
Once you key in configured with heroku and github with command all your code goes to github and from there to Heroku
git push heroku master
and soon you will see these messages
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets

Resources