heroku push rejected, failed to compile Ruby/rails app
try this,
remove Gemfile.lock
file and do bundle install
, then git add
, git commit
and git push
.
heroku push rejected, failed to compile Ruby app
I was actually able to solve the issue. I found out I was trying to push the project to another branch (not the master branch). I solved the issue by merging the branch with master branch and pushed it again.
Push rejected, failed to compile Ruby app to heroku
It seems to be a problem related to the ruby version Heroku is using. You could try setting the ruby version so Heroku uses the same one as you use locally.
Heroku push rejected because gems fail to install
This error is caused because you have incorrect line endings (CRLF vs. LF) in your repo, which is generally caused when you are working/deploying across Windows and Unix-like environments. Mac/Unix/Linux environments -- which Heroku uses -- use a single linefeed (usually denoted \n
) character to terminate a line while Windows uses a carriage return/linefeed pair (\r\n
).
If your local repo is on a Windows machine you'll need to convert the files in your repo before pushing to Heroku. You can configure Git to handle the auto-conversion so that you have Windows terminators when you checkout on Windows but maintain the repo with just linefeeds.
To set up the automatic conversion:
% git config --global core.autocrlf input
Git also provides a way to refresh your repo to ensure all the line endings are correct. This can cause merge headaches since this can affect every line in some/all files, so you preferably want to do this on a fully up-to-date repo (i.e., no un-pushed changes).
% git add --renormalize .
% git commit -m "Normalize all the line endings"
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings
Related Topics
How to Get the Current Working Directory's Absolute Path from Irb
How to Upgrade My Ruby 1.9.2-P0 to the Latest Patch Level Using Rvm
Check If a Table Exists in Rails
What Is a Very Simple Authentication Scheme for Sinatra/Rack
Rails: Logging the Entire Stack Trace of an Exception
Pass Ruby Script File to Rails Console
Rails Get Index of "Each" Loop
Recurring Billing with Rails and Activemerchant: Best Practices, Pitfalls, Gotchas
Transfer Db from One Heroku App to Another Faster
Devise Password Reset from Rails Console
How to Initialize an Array in One Step Using Ruby
How to Seed the Production Database Using the Capistrano Gem
Fetch VS. [] When Working with Hashes
Removing All Installed Gems and Starting Over
Don't the Ruby Methods Instance_Eval() and Send() Negate the Benefits of Private Visibility