Gem File with Git Remote Failing on Heroku Push

Gem file with git remote failing on heroku push

Use this GitHub URL instead: git://github.com/Dakuan/client_side_validations.git

The git@github.com:… URL is the writable SSH version, which requires authentication with an SSH key connected to a GitHub account that has write access to the repository.

The git://github.com/… URL is the public, read-only version.

Since the gem you're using is in a public GitHub repository, you can also use this shorthand in your Gemfile:

gem 'client_side_validations', :github => 'Dakuan/client_side_validations'

See the Bundler Git documentation for more information.

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

Pushing the app to production on Heroku is failing

Your code is deployed just fine. But something about your application is throwing an error when you try to load the homepage.

Heroku is really friendly for checking the logs.

You can check the logs in your dashboard. The URL will be like this:
https://dashboard.heroku.com/apps/(yourappname)/logs

Or, install the Heroku Command Line Interface
then from the console, within your project file, do this:
heroku logs -t

This will print out the server logs on your local console.

I'd bet a dollar that you actually forgot to perform a migration:

heroku run rails db:migrate

This is usually the thing I forget to do.

How do I fix a Bundler Conflict when pushing to Heroku?

I've ran into this issue some time ago: I contacted Heroku and they told me they have a locked version of Bundler, so your only option is to use the Bundler version they use:

gem uninstall bundler
gem install bundler -v 2.0.2
bundle update

Rails app - Heroku push rejected - Seeming Gemfile and Gemfile.lock issue

Delete your Gemfile.lock and run bundle install again

Cannot push to Heroku (gemfile.lock issue)

The answer was deceptively simple (of course):

git push staging staging:master


The issue was that I was on the staging branch and needed to update my Heroku staging server's master branch.

Shame on me for overlooking something so obvious!
... and shame on Heroku's decidedly unhelpful output.

Heroku push rejected, failed to install gems via Bundler

I don't think it's a Rails version problem, nor is it specific to Heroku. (I hit the same problem today, when running bundle install on my local development machine, with Rails 3.0.3.)

Running bundle update locally, as Andrew suggested, fixes the issue.

Edit:
As suggested in the comments: remember to git add ., git commit -m "message"



Related Topics



Leave a reply



Submit