GitHub Repo working but Heroku still the same - heroku

When i'm pushing to github, the push works fine and my Repo is properly updated.
When deploying to Heroku, although it shows that everything works, and it pulled from the master (as i understand) the Files don't get updated.
76180b5..7bd1ec4 master -> master
I'm trying to get this working for hours now.. I even deleted the whole folder from my computer.. Set everything from scratch up.. But still not updating on Heroku...

Why don't you try removing your heroku repo from your local machine, and adding again?
git remote rm heroku
$ heroku git:remote -a newname

Well, everyone has his stupid moments...
actually not precompiling my assets was the problem.
rake assets:clean
rake assets:precompile
and everything works again..

Related

Cloning locally previous Heroku version

Hi guys I have been looking for an answer all over internet,
But cannot find any answer that is helping me
I have a django app on heroku. I would like to donwload a previous version of my app. It is currently v62 and I would like to download V59 locally
I tried to rollback and then to do
heroku git:clone -a guarded-tor-21020
but it still download V62.
What is the commande to download V59 please ?
Thx you
After you've cloned your app you need to find a commit that corresponds to V59: heroku releases -a guarded-tor-2102. Look for line V59 Deploy <git-commit>.
Now do git checkout <git-commit>.
first:
heroku releases to check the version you wish to rollback to
second:
heroku rollback v46 46 can be any version of your choice
third:
git log --reflog to see view and copy your commit id
fourth:
git checkout *commit id*
fifth:
heroku git:clone -a APP-NAME to download current version

Heroku clone creates an empty folder

So I am trying to learn heroku and yesterday from another computer I created an app. Today, from a different computer I am trying to clone the app (download the code) and keep working on the same app so I did this
heroku git:clone -a myappname
I get the message
warning you have appeared to have cloned an empty directory
The app is running online so the code must be there.
According to the documentation this command does this
This will create a new directory named after your app with its source
and complete repository history, as well as adding a heroku git remote
to facilitate further updates.
However, the repository is empty.
I saw the question below but I that didn't work for me. How can I simply get the code locally and keep working on this app without creating a new one? Thanks.
Why am I getting an empty repo when cloning my keystone app to local repo from heroku?
This is counterintuitive, but looks like it is by design at Heroku. You don't copy from Heroku git to local drive, but the other way around - from your PC to Heroku.
You need to create or clone a repository on your local PC.
git create <new repository> OR
git clone <source>
then init your repository and commit code:
$ cd myapp
$ git init
Initialized empty Git repository in .git/
$ git add .
$ git commit -m "my first commit"
Then you need to link your repository with Heroku. Download their Toolbelt and run:
heroku git:remote -a your_app_name_on_heroku
And deploy code:
git push heroku master
Hope that helps. I had to open a ticket at Heroku to figure this out. Check Heroku Git instructions for further reference.

Deploy Parse-Server

I deployed Parse-Server-exemple to Heroku using thee Deploy button, and everything is working fine. (up to the fact that there are some bugs)
But the Parse-Server(https://github.com/ParsePlatform/parse-server)is being updated more frequently and now has lower bugs.
How to deploy Parse-Server on Heroku ?? or at least how to update the server running on my existing Heroku app ?? I can't find the answer anywhere
Parse-server is the nodejs package. you can remove this line here and you can remove the node_modules from .gitignore, then you need to download the "Parse Server" to your node_modles folder and deploy it. but it will be easy if you try to use some service like www.parseground.com
Your starting point should be reading up on how to deploy nodejs apps on heroku. Parse Server is just another npm module. Contrary to #pivanov's answer you should preferably keep node_modules in gitignore and let heroku install the npm packages including Parse Server. This is what heroku recommends in their documentation.
You can clone your parse-apps by running the falling command using the heroku work belt
$ heroku login
$ heroku git:clone -a
Heroku at this point automatically create a git branch 'master' that you can commit to.
You can now make changes to your parse server version depending in the available version.
Current version i think is 2.1.4
"parse-server": "^2.1.4",
You can now commit and push changes to the master branch created.
$ git add .
$ git commit -am "make it better"
$ git push heroku master
You can use
npm update
it will update the parse server if you have used "*" as its version in your package.json file.

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

how to get rails app working locally after heroku clone?

My local code got messed up so I would like to download the version off heroku and start using that. I ran this to download
heroku git:clone -a myapp
then I installed taps using
gem install taps
then I ran
heroku db:pull
Is this all that's required? Just want to make sure that I don't mess up anything and can easily redeploy using git push heroku master later.
I haven't tried to pull code directly from Heroku, but I'm not sure why you would need to, since "git push heroku master" just pushes the master branch of your code from your Git repository to Heroku. Unless you've pushed your "dirty" code to Git, you should just be able to remove the bad code locally and do a "git pull" to get the good code from your Git repository directly.

Resources