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.
Related
I'm attempting to deploy my Ruby on Rails application that is currently on branch "rails_app" (as shown below). I have successfully deployed it before, but it is now not working with additional changes. When I manually look for buildpacks by running "heroku buildpacks," it indicates the correct one is there. [When I try to reinstall the buildpack, it also says it is already there] When I attempt to push to heroku I receive the failure to detect set buildpath as shown below.
Dougs-MBP-2:Rails_Application Doug$ heroku buildpacks
app_name Buildpack URL
heroku/ruby
Dougs-MBP-2:Rails_Application Doug$ git branch
gh-pages
master
* rails_app
update
Dougs-MBP-2:Rails_Application Doug$ git push heroku rails_app:master
Counting objects: 70, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (70/70), 217.85 KiB | 0 bytes/s, done.
Total 70 (delta 46), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to app_name.
remote:
To https://git.heroku.com/app_name.git
! [remote rejected] rails_app -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/app_name.git'
Thanks for your help.
It seems you are setting a custom buildpack: "https://codonbuildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz" but when I visit that link it says that no bucket with that name exists which means that heroku can't detect your custom buildpack and fails.
You can read more about how to specify custom buildpacks here: https://devcenter.heroku.com/articles/buildpacks#detection-failure
The ruby buildpack that heroku uses is on this page:
https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-ruby
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
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.
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
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.