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 againgem 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
How to Condense Summable Metrics to a Unique Identifier in a Ruby Table
Loaderror - Cannot Open Shared Object File - File Is Present, But It Says No Such File
Pageobject with Ruby - Set Text in a Text Field Only Works in the Main File
How to Require Activerecord in Irb
How to Add "Access-Control-Allow-Origin" Headers to API Response in Ruby
When Joining Table, Rails Anyway Makes Additional Request When Accessing Fields from Joined Table
Rails Undefined Method 'Errors' for Nil:Nilclass in Simple_Form
How to Use Local or Instance Variable in Ruby Code in Coffeescript in Haml Template
How to Put a Raw SQL Query in Sequel
Check If a Table Exists in Rails
Instagram Ruby Gem - Unable to Reach Callback Url
In Ruby, How to Know in the Console What a Method Does
How to Extract Specific Elements from an Array
Heroku-18: Git Push Fails. Showing Different Versions of Ruby on Push
Ruby on Rails Group_By (How to Group Events by Month)
Delete from Database with Specific Details in Ruby
How to Give a Date a Background Color with Axlsx
How to Make the Say Command Echo a Variable Value in a Script