Heroku error message no Cedar-supported app detected - heroku

So, I am running into more problems with heroku and this rails tutorial. The rails tutorial I am making had me develop a super basic app. They then had me create a bit bucket account. After this they had me create a Heroku account. Now they are asking me to push my origin master to my heroku host. When I do this, I am getting this error message and I cannot figure it out. Anyone have any hints as to how I could solve this? Thanks so much in advance!
alopex#alopex-TH55-HD:~/work-space$ git push heroku master
Counting objects: 66, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (66/66), 16.39 KiB | 0 bytes/s, done.
Total 66 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: ! Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote: to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote: Building source:
remote:
remote:
remote: ! Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote: to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to safe-badlands-5004.
remote:
To https://git.heroku.com/safe-badlands-5004.git
! [remote rejected] master -> master (pre-receive hook declined)

You need to cd in to your project directory, as I'm assuming ~/work-space isn't the name of your app.
Do the following: cd path/to/root/of/your/project and try the command again.
UPDATE
Historically, the more major fix for this has been one of two things:
Correctly naming your .buildpacks file (make sure it's not .buildpack)
or
Reinitializing your .git files:
rm -rf .git
git init
git add .
git commit -am "Reinitialize"
heroku create --stack cedar
git push heroku master

I GOT IT! OH LORD I GOT IT!
Ahem...
So, Steve and Collin were correct. I did in fact need to be in my project directory so Heroku could sense my Ruby files and proceed accordingly. I goofed up when I pushed my initial app to Bit Bucket. I pushed my app onto Bit Bucket inside of a main directory. This made my app the a subfolder, which in turn made it impossible for Heroku to detect its presence.
The solution was selecting all of my app, click and dragging it to the desktop and deleting the phony main folder. I the proceeded to put my files back into the Bit Bucket repository and add, committed, and pushed it to Bit Bucket.
If this happens to you, make sure that you also drag the hidden folders in your app into your new folder as well, as that could really mess you up.
Thanks everyone!

Related

Heroku: Failed to compile Elm app while deploying a copy of an app

I am trying to make a copy of this Elm web-app with Heroku. When I click 'Deploy App' however, the build log displays this:
-----> Source app detected
-----> Creating profile.d script
SOURCE_VERSION:
Script installed to .profile.d/source_version.sh
-----> Elm app detected
-----> Retrieving 0.18.0
https://s3.amazonaws.com/heroku-buildpack-elm/assets/elm/0.18.0/elm:
2018-10-22 04:07:13 ERROR 403: Forbidden.
! Push rejected, failed to compile Elm app.
! Push failed
I have checked the app.json file and I didn't notice anything strange with it. Could this be related to the issues that Github is having right now (in Australia at least)? Am I doing something wrong? As soon as Github have fixed their issue I will try making an issue there, but the last commit was 2 years ago so that probably wouldn't do much. Thanks.

Error when Yeoman app deployed to Heroku

I get the following error after deploying my Yeoman app to Heroku
GET http://myapp.herokuapp.com/favicon.ico 503 (Service Unavailable)
I have a favicon image, and everything runs fine locally with the favicon image appearing. I'm not sure how to fix this error or why it is being caused in the first place.
Here is all my code: https://github.com/dkretsch12/MyHerokuApp
And I push it to Heroku with the following commands:
git add .
git commit -am "still stuck"
git push heroku master
I also ran into this, and for me it turned out the '503 (Service Unavailable)' error was not the real error.
Try:
heroku logs --app [your-app-name]
and see if it gives you more info.
In my case it was that Heroku was looking for npm start script, which I had not specified, but is required by Heroku.
Looking at your package.json I see you don't have it either, so that might be the place to start.
edit
I think the underlying reason for this error is that by default Heroku expects a webserver or some kind executable to be running in the background. It's needed because otherwise incoming requests would not be handled. So it has to be provided by the programmer, and after installation Heroku will run it, either by npm start or by what is specified in the Procfile.
I my case I needed a webserver anyway, so I just created a server.js module where I implemented a small express app. Then in package.json I specified:
"scripts": {
"start": "node server.js",
...
},
But this may not be the right solution for you, it depends on what you want with your app. I don't know anything about Grunt or Angular, so I can't help you there. I did find this question which may be of value to you. I also recommend reading the docs on Heroku Dev Center
I had the same 503 service unavailable error favicon.ico, when attempting to open a Heroku deployed Rails/React app. I was stuck on this bug for at least an hour, and thought this post may provide insight on how I solved the 503 favicon issue.
Step 1: I tried to locate a favicon.ico file in my rails app, tried creating my own favicon.ico file, and placing said file in the root and other directories. I got the same error...
Step 2. I ran the following in terminal: heroku logs -t, scrolled up and found the actual error to be Heroku failing to support gem sqlite3.
An error occurred while installing sqlite3 (1.3.13), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.13'` succeeds before bundling.
remote:
remote: In Gemfile:
remote: sqlite3
remote: !
remote: ! Failed to install gems via Bundler.
remote: ! Detected sqlite3 gem which is not supported on Heroku:
remote: ! https://devcenter.heroku.com/articles/sqlite3
More info as to why is here.
Step 3: After learning more, I discovered I can either follow the heroku documentation to figure out how to use sqlite3 with heroku, or change DB. I chose to change DB to postgres, and I found two amazing resources to help with that:
how to change your rails app database from sqlite to postgresql before deploying to heroku.
Change from SQLite to PostgreSQL in a fresh Rails project
Step 4: After doing so, I got a 500 internal server error, went to heroku logs -t again, and found out that my tables did not exist on heroku. From there, I knew I had to migrate rails DB to heroku using the following command: heroku run bundle exec rails:db migrate. Pushed to heroku and that did the trick.
TLDR: A status 503 unable to find path="/favicon.ico" doesn't necessarily mean the issue stems from a missing favicon.ico in a heroku deployed app. A more insightful method for determining root cause is to use heroku logs -t.

Heroku "Push rejected, failed to detect set buildpack heroku/ruby"

So i'm trying to push my work (Sinatra) to Heroku but keep getting the error "Push rejected, failed to detect set buildpack heroku/ruby"
Suggestions?
Facepalm It seems like we have a rubberduck situation over here... kinda. Since I forgot to add a Gemfile. -.-'
You should also make sure you're on the master branch or that you have have your Gemfile and package.json on your master branch when you push. I had the same error using a heroku/python buildpack but I was not on the master branch. My master branch did not have a Procfile on there, so even though I saw a Procfile, heroku did not.

Why does gitlab freeze when I clone/pull my repo?

i've created a private repo on gitlab.
from my office's macbook i can clone, pull, push and whatever, but here at home (with a little older macbook), when i try to clone the repo, it stuck on "compressing objects" with a different percentage each time...
no matter how big the repo is (i'm trying to clone a 5KB project..)
eg:
git clone git#gitlab.com:username/myproject.git
Cloning into 'myproject'...
remote: Counting objects: 24, done.
remote: Compressing objects: 26% (6/23)
i can leave it here for hours (actually i tried for about 30 minutes..)
but the only thing i can do is hit "ctrl+c" and kill the process, then it says
Killed by signal 2.
fatal: index-pack failed
i'm using:
OSX 10.9.4
git version 1.9.3 (Apple Git-50)
i tried also to create the folder, then
git init
git remote add origin git#gitlab.com:username/myproject.git
git pull
but the result still the same as cloning the whole project
btw.. searching online i found this answer ( https://stackoverflow.com/a/22798706/1294988 ) so i tried to execute:
git clone https://gitlab.com/0X1A/dotfiles.git
and it did it quick and easy! so what's wrong with mine?
any help?

git clone copying some files from other projects?

I've forked a repository, and after doing so, attempted to clone it
$ git clone https://github.com/dax/newly_cloned_project.git
the clone is successful:
Cloning into '[newly_cloned_project]'...
remote: Counting objects: 180, done.
remote: Compressing objects: 100% (143/143), done.
remote: Total 180 (delta 57), reused 144 (delta 21)
Receiving objects: 100% (180/180), 206.54 KiB | 268 KiB/s, done.
Resolving deltas: 100% (57/57), done.
but when change directories to newly_cloned_project, i'm greeted with this:
You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to '.ruby-version' using 'rvm rvmrc to [.]ruby-version'
or ignore this warning with 'rvm rvmrc warning ignore /Users/charliekim/programming/developer application tasks/connect_four/.rvmrc',
'.rvmrc' will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'.
I'm using an .rvmrc file for other projects - but this is newly created and has no such file - upon closer inspection, it turns out that a fair few files are in my newly_cloned_project directory - including an .rspec file and accompanying spec directory...
I've looked around SO and Google but haven't seen any reference to this - I've triple checked my cloning process, so it's no problem there (that I can tell?) really not sure what's going on!
Stupid mistake - if anyone else is having trouble like this, be sure to check that you've not made unnecessary changes to your user level gitconfig file (found at ~/.gitconfig on unix systems).
I had added a remote for a specific repository in this file and that was causing the issue.
~/.gitconfig
[remote "origin"]
url = [email_address]:dax/other_repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
should be in .../other_repo/.git/config

Resources