I tried following the instructions here in order to create a static website on Heroku's Cedar stack.
I have put the site up here.
When I try to push the app (using "git push heroku master"), I get the following error:
Kushs-MacBook-Air:hgtr kushpatel$ git push heroku master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.29 KiB, done.
Total 7 (delta 1), reused 0 (delta 0)
-----> Heroku receiving push
-----> Removing .DS_Store files
! Heroku push rejected, no Cedar-supported app detected
To git#heroku.com:gentle-warrior-1301.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:gentle-warrior-1301.git'
Any help is greatly appreciated. I am on the latest ruby/rack/heroku
The instructions are for Bamboo stack which would have had Rack installed - the Cedar stack is entirely empty so you need to have rack installed.
You need to add a Gemfile with
source :rubygems
gem 'rack'
bundle it and then add the Gemfile and Gemfile.lock to git and repush.
Those instructions are for the Bamboo stack.
The cedar stack needs a Procfile to be able to identify how to run your app.
Something like this in your Procfile should do the trick - assuming you're using thin:
web: bundle exec thin start -p $PORT -e $RACK_ENV
Related
I'm trying to push my code to GitHub, but keep getting the following errors:
remote: warning: File .vscode-server/bin/e4503b30fc78200f846c62cf8091b76ff5547662/node is 75.64 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: Trace: 0d8800fdb9c63ca4691425c2af625642fe616e4fc3de1320cdb47e20a5fc07bf
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File .local/share/TabNine/models/ce94127b.tabninemodel is 241.05 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/elilogbro/p-rails.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/elilogbro/p-rails.git'
I don't think the Tabnine extension nor the .vscode-sever file should be getting to pushed to GitHub and I've never encountered these errors on other projects I've done. Should I somehow add these files to .gitignore, or is there another way to prevent them from being included in the push?
Thanks everyone!
I don't think the Tabnine extension nor the .vscode-sever file should be getting to pushed to GitHub
Then use git filter-repo (Python-based, must be installed first) to remove from your local repository history those folders (and their content).
Only once those folder and large content are no longer part of your local repository commits would you be able to push.
After a week of dealing with this issue, I found out that I had accidentally git init a level above my repo, so my entire directory was trying to push to GitHub. To fix the issue, in my directory i git remote remove origin, then cd'd into my project folder, git init, git add ., git commit -m, and git push -u origin main.
I try to push my app to Heroku, but it keep giving me this error.
I did it before, but this time, I don't know the reason of the error.
I searched, but none of the solutions I have found helped me to solve this problem.
So anyone can tell me why this error happened ?
PS D:\my admin react project> git push heroku master
Enumerating objects: 84, done.
Counting objects: 100% (84/84), done.
Delta compression using up to 4 threads
**strong text** Compressing objects: 100% (77/77), done.
Writing objects: 100% (84/84), 761.66 KiB | 2.21 MiB/s, done.
Total 84 (delta 32), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Your account has reached its concurrent builds limit
remote:
To https://git.heroku.com/driver-admin.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/driver-admi
n.git'
You just have to wait for a few minutes and it will start working.
Or you can just add your card details and verify your account.
I ran into the same Issue, if you go to the website and click "more" on top and then clicking "restart all dynos".
Check and open the Windows Credentials Manager (which is, if you see "manager" when typing git config credential.helper, the cache for HTTPS credentials)
If you see the wrong username/password for git.heroku.com, that would explain the error message, since, as mentioned in this answer, a wrong account, or even a correct but unverified one can now run only one build at a time across all their apps.
Also have a problem with deploying an app today. heroku has an incident: https://status.heroku.com/incidents/1892
I'm trying to deploy a fresh React app made via Create-react-app to my Dokku on DigitalOcean thank to this heroku buildpacks. Following their instructions it ends up failing ...
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-static.git
=====> Detected Framework: Static HTML
remote: % Total % Received % Xferd Average Speed Time Time Time Current
remote: Dload Upload Total Spent Left Speed
remote: 100 838k 100 838k 0 0 514k 0 0:00:01 0:00:01 --:--:-- 514k
-----> Installed directory to /app/bin
Using release configuration from last framework (Static HTML).
remote: cat: /tmp/build/last_pack_release.out: input file is output file
--- {}
-----> Discovering process types
Procfile declares types ->
-----> Releasing justpushit-app (dokku/justpushit-app:latest)...
-----> Deploying justpushit-app (dokku/justpushit-app:latest)...
-----> Attempting to run scripts.dokku.predeploy from app.json (if defined)
-----> App Procfile file found (/home/dokku/justpushit-app/DOKKU_PROCFILE)
-----> DOKKU_SCALE file found (/home/dokku/justpushit-app/DOKKU_SCALE)
=====> web=1
-----> Attempting pre-flight checks
For more efficient zero downtime deployments, create a file CHECKS.
See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
CHECKS file not found in container: Running simple container check...
-----> Waiting for 10 seconds ...
remote: App container failed to start!!
=====> justpushit-app web container output:
Injecting runtime env into /app/build/static/js/main.060925d8.js (from .profile.d/inject_react_app_env.sh)
setuidgid: usage: setuidgid account child
=====> end justpushit-app web container output
To pantouflesdokku:justpushit-app
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku#pantouflesdokku:justpushit-app'
Everything seems to work fine but the app is never launched. What am I missing here ?
Because I had the same problem I opened an issue for this specific build pack: https://github.com/mars/create-react-app-buildpack/issues/54 And luckily it's maintainer was kind enough to provide me with the correct Procfile content.
To fix this problem you should have a Procfile with the following line:
web: bin/boot
Instead of web: npm start this won't spawn a complete development server. So it should be a lot easier on your server's memory/cpu usage.
The solution was fairly simple. The whole build works but the application must be initialized somehow.
I added a Procfile and wrote the following line in it ...
web: npm start
Hope it helps.
I am getting the following error message in the heroku logs when trying to access the application from the browser:
Gem Load Error is: Could not find a
JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
This is being triggered by a couple of gems - ngannotate-rails and coffee-rails.
This is a rails 4.2 application with a angular.js frontend, being deployed to heroku for the first time.
Heroku stack:
$ heroku stack
=== my_app Available Stacks
heroku-16
* cedar-14
Buildpacks:
$ heroku buildpacks
=== my_app Buildpack URLs
1. https://github.com/prakashmurthy/heroku-buildpack-nodejs
2. heroku/ruby
Both the node.js build and ruby build complete successfully.
PATH seems to be set correctly:
$ heroku run bash
Running bash on ⬢ my_app... up, run.1502 (Free)
~ $ echo $PATH
/app/bin:/app/vendor/bundle/bin:/app/vendor/bundle/ruby/2.3.0/bin:/usr/local/bin:/usr/bin:/bin
Appreciate any help in figuring out this issue.
I am trying to push my yo angular-fullstack MEAN app to Digitalocean with Dokku. I've followed the documentation on Digitalocean's site, but I get the following error when pushing:
git push dokku master
Counting objects: 965, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (945/945), done.
Writing objects: 100% (965/965), 242.54 KiB | 0 bytes/s, done.
Total 965 (delta 668), reused 0 (delta 0)
To dokku#xxxxxxxx.com:xxxxxxxx.com
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku#xxxxxxxx.com:xxxxxxxx.com'
I set up my droplet using the one click Dokku image, and it's running on Ubuntu 14.04.
I've fixed this, but I'm not entirely sure how. I checked git status, and it showed that there was an untracked folder. When I resolved that issue, it pushed successfully, though now there is a different issue: how do I serve the dist folder that grunt build creates?