I'm in the process of pushing a webapp I designed in Rails to Heroku, but I'm having trouble when pushing the app to heroku. According to the console, when it starts preparing the app for the Rails asset pipeline, the rake aborts. At the end I get this error:
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/connectr-demo.git'
I have heard that this is because of conflicts in the commits, but I have already pulled from github and everything is up to date, or at least the console is reporting so. At the recommendation of a similar question, I tried using "git fetch origin" and "git pull --rebase" but got the exact same results. I still get this error when I try to push to heroku. Can anyone tell me how I can fix this?
Is it a fast-forward merge, or do you need to force push?
Try git push -f heroku master...
Have you tried running heroku run rake db:migrate and then try re-pushing to heroku git push heroku master
The (pre-receive hook declined) means that Heroku didn't recognize the app. Make sure that the rails app is in the root directory of the repo not in a sub directory, make sure you have a Gemfile and make sure that it is named correctly.
Related
When I added a gem to my app's Gemfile, committed the changes, and attempted to git push heroku master, it simply told me all the changes were up-to-date, via the message below.
$ git push heroku master
Everything up-to-date
How can I go about diagnosing this problem? thank you.
Try to the following:
git push heroku heroku:master
I did git push heroku master then I got error below
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.example.com
So I did heroku logs --tail to find out the problems then I got below
enable Logplex by exmaple#mail.com
Release v2 created by example#mail.com
Slug compilation failed: failed to compile Ruby
I don't know how to fix this issue and push heroku well. need your help!
Can you make sure you've added
gem 'rails_12factor', group: :production
To your gem file and run
Bundle install
Followed by git add . and git commit -am "something"
And try to push again.
I am new on Ruby/Rails application development. I already love Ruby/Rails because it's easy to learn. I've built an Rails application and i try to deploy on Heroku.
When i type :
heroku create
Creating app... done, stack is cedar-14
https://aqueous-plateau-17182.herokuapp.com/ | https://git.heroku.com/aqueous-plateau-17182.git
I don't have the following message :
Git remote heroku added
I think there is a problem with my remote :
git remote -v
heroku git#bitbucket.org:pracede/hubapp.git (fetch)
heroku git#bitbucket.org:pracede/hubapp.git (push)
origin git#bitbucket.org:pracede/hubapp.git (fetch)
origin git#bitbucket.org:pracede/hubapp.git (push)
git config --list | grep heroku
remote.heroku.url=git#bitbucket.org:pracede/hubapp.git
remote.heroku.fetch=+refs/heads/*:refs/remotes/heroku/*
1.There are remote but heroku refers to bitbucket. Is it correct ?
If no correct, how to do, please ?
I cannot deploy. I have the following message :
git push heroku master
Everything up-to-date
My rails application is not alive. Is someone could explain me, please ?
Thanks
First delete the current remote heroku reference(i.e pointing to bitbucket remote ) with -
git remote rm heroku
Add then add heroku remote to your repo -
git remote add heroku git#heroku.com:aqueous-plateau-17182.git
Hope this helps!
Note: I am using Rails 3.2.13 and Ruby "1.9.3", and postgres-0.15.1
I tried to push my Ruby on Rails app in to heroku by following the procedure this website
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-deploying
, but I got error while try to push into heroku
Connecting to database specified by DATABASE_URL
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
! Precompiling assets failed.
! Push rejected, failed to compile Ruby app
To git#heroku.com:pure-hamlet-9148.git
! [remote rejected] master -> master (pre-receive hook declined)
So, I Googled myself and run the below command
heroku labs:disable user-env-compile
heroku labs:enable user-env-compile
Still getting the same error, please some help me to resolve this issue.
Along with Simone's answer,
Follow this website to precompile your assets locally before deploying. https://devcenter.heroku.com/articles/rails-asset-pipeline
RAILS_ENV=production bundle exec rake assets:precompile
git add public/assets -f
git commit -m "vendor compiled assets"
Check this article about Heroku and Rails asset:precompile error. You should set
config.assets.initialize_on_precompile = false
A way to resolve this error:
First of all set DATABASE_URL environment variable & then again tried to push code to Heroku again. And it worked as all rake compilation done at Heroku side so no more connection to local machine making rake compilation # .../tmp/bin..... directory.
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