Error When Pushing to Heroku - ...Appear in Group - Ruby on Rails

Error when pushing to Heroku - ...appear in group - Ruby on Rails

The problem is the query itself.

Postgresql has much stricter rules for the use of aggregate functions in SQL Queries - you need to add the columns to your group by clause.

Why I get an Error when trying deploy Ruby on Rails app to Heroku?

OK, I solved the problem. Maybe it will help someone in the future:

  • update Ruby version to 2.6.1
  • gem uninstall bundler and install again gem install bundler -v 2.0.2
  • delete Gemfile.lock and bundle install
  • git push heroku master
  • it works :)

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.

heroku failing to deploy my app

here was an error parsing Gemfile: syntax error, unexpected ':', expecting end-of-input - group: production

As above log...It is Just syntax error

group: production do
gem 'pg'
gem 'rails_12factor'
end

update it from

group :production do
gem 'pg'
gem 'rails_12factor'
end

Heroku Push - Error with Git Push to Heroku

One problem I had which caused hours of headaches was with the 'taps' gem. It was causing pretty much the exact same error for me until I moved it into the 'development' group:

group :production do 
gem 'taps'
gem 'pg'
end

Not sure if this is directly applicable to you, but it produced sqlite3 errors until I put taps into :production. Hopefully it'll help someone.

EDIT: @cloneofsnake: I don't have enough rep to comment on your answer, but I see you have the 'taps' gem in your Gemfile. Either get rid of it, or put it in the :production group; taps has some dependencies on sqlite3 apparently. I had already switched out sqlite3 for pg, but I was getting the same error as you until I moved 'taps' to production.



Related Topics



Leave a reply



Submit