Why is Heroku rejecting this git push? - ruby-on-rails

I make a new Heroku app inside of my current app directory using Heroku create and ran this:
MyMac:bodb pawel$ git push heroku master
Counting objects: 359, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (291/291), done.
Writing objects: 100% (359/359), 13.83 MiB | 2 KiB/s, done.
Total 359 (delta 40), reused 0 (delta 0)
! Heroku push rejected due to an unrecognized error.
! We've been notified, see http://support.heroku.com if the problem persists.
To git#heroku.com:myproject.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myproject.git'
My rails app runs on Ruby 1.8.7 but even a Heroku app on --stack bamboo-ree-1.8.7 fails.
I have also run bundle install and my Gemfile is up to date.

I don't know why the commit was corrupted, but contacted Heroku and they sorted it out.

I had that error once when I changed the Gemfile but did not run bundler and therefore modified Gemfile.lock

Related

remote rejected master -> master (pre-receive hook declined) heroku

I recieve an error while pushing rails code to heroku.
Counting objects: 20, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (20/20), 1.75 KiB | 0 bytes/s, done.
Total 20 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Could not complete the action. Please try again later.
remote:
To https://git.heroku.com/dishcuss-api.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/dishcuss-api.git'
I have tried the few methods , including rollback heroku and git pull , but it didn't work for me.
just run the migration on heroku:
heroku run bundle exec rake db:migrate
I see 2 possible solutions to your problem:
It's possible that you didn't run your latest migrations on your Heroku server. In that case do heroku run rake db:migrate.
The other option is that this is caused by their SSL certificate that isn't valid any more as of a few hours ago; they're working on that.

Failed to deploy redmine to HEROKU due to Gemfile.lock nonexistence

I had this particular error upon pushing/deploying to Heroku
Counting objects: 92259, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19977/19977), done.
Writing objects: 48% (45054/92259), 13.63 MiB | 103 KiB/s
Writing objects: 100% (92259/92259), 23.82 MiB | 87 KiB/s, done.
Total 92259 (delta 72165), reused 90569 (delta 70774)
-----> Ruby/NoLockfile app detected
!
! Gemfile.lock required. Please check it in.
!
! Push rejected, failed to compile Ruby/NoLockfile app
To git#heroku.com:xiruki-task.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:xiruki-task.git'
I've tried to remove the Gemfile.lock and bundle install again but no luck.
Any workarounds will be appreciated.
run bundle install and that will generate your gemfile.lock. Then commit it and deploy to heroku

Error: deploying Rails 2.3.8 app to heroku

Would appreciate any insight into how to get my Rails 2.3.8 deployed using Heroku. I am getting the following error message when I try to push to push to heroku:
git push heroku master
Enter passphrase:
Counting objects:3, done.
Compressing objects: 100 % (2/2), done.
Writing onject: 100 % (3/3), 4.34 KiB, done.
Total 3 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
Heroku push rejected, no Cedar-supported app detected
To git#heroku.com: falling-sunrise.git
[remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:falling-sunrise.git'
I have also attached the actual screenshot of my command line screen. I read somewhere that I may have to write a gemfile to get the push to work. I also did that and added it to the root of my app but no luck.
Can you provide the layout of your app? Make sure to run bundle install locally and to check your Gemfile; it may not be configured correctly, or you haven't added it the new files (including the ever-important Gemfile.lock) to git.
Also see https://devcenter.heroku.com/articles/ruby-support#rails_2x_applications
try bundling your gemfile and making sure it's complete. If that doesn't work, you might try pushing your app to a bamboo stack:
https://devcenter.heroku.com/articles/bamboo

Rails app not recognized by Heroku

I can't push to Heroku and unfortunately none of the other questions on StackOverflow help.
I'm using Rails 3.0.9 and Heroku doesn't recognize my app as a Rails app.
$ git push heroku master
Counting objects: 378, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (311/311), done.
Writing objects: 100% (378/378), 134.64 KiB, done.
Total 378 (delta 143), reused 107 (delta 12)
-----> Heroku receiving push
-----> Removing .DS_Store files
! Heroku push rejected due to an unrecognized error.
! We've been notified, see http://support.heroku.com if the problem persists.
To git#heroku.com:cold-xyz.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:cold-xyz.git'
The repository's layout was wrong.
My rails app was in a subdirectory of the repository. I set Rails' root directory to the repositories root directory and that fixed it:
git mv subdirectory/* .
Try updating your bundle, and then pushing it again.
Or may have something to do with gemlock file?
Else if all fails, you can remove the .git file and re init again.

Why am I getting an error on Heroku that suggests I need to migrate my app to Bamboo?

When I type: git push heroku master, this is what happens
$:sample_app git push heroku master
Counting objects: 110, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (94/94), done.
Writing objects: 100% (110/110), 87.48 KiB, done.
Total 110 (delta 19), reused 0 (delta 0)
-----> Heroku receiving push
-----> Rails app detected
! This version of Rails is only supported on the Bamboo stack
! Please migrate your app to Bamboo and push again.
! See http://docs.heroku.com/bamboo for more information
! Heroku push rejected, incompatible Rails version
error: hooks/pre-receive exited with error code 1
To git#heroku.com:blazing-frost-89.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:blazing-frost-89.git'
My .gems file:
rails --version 2.3.8
My .git/config file:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git#github.com:csmeder/sample_app.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "heroku"]
url = git#heroku.com:blazing-frost-89.git
fetch = +refs/heads/*:refs/remotes/heroku/*
Like it says, Rails 2.3.8 is only available on their Bamboo stack. I think it's because Bamboo is slated to become the default stack in the near future, and Rails has only been upgraded on that stack.

Resources