-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL, Rails + Heroku, Column must appear in “group by” error #1
Comments
Were you able to send messages to multiple recipients? |
On the development side, yes, but everything breaks when I try it out in production on Heroku. |
Did you change anything in particular in development mode? The create action in particular, line 40 in the Messages Controller...I get this message! Couldn't find all Users with IDs (rexpraseo_1, rexpraseo_2, rexpraseo_3) (found 0 results, but was looking for 3) Framework Trace |
I didn't change anything in the messages generator. The only thing I can see being the root cause of this issue is that I used sqlite3 (I was mistaken when I previously stated MySQL) in development and PostgreSQL in production because it is required by Heroku. Are you also having problems? |
I've only tried it in development...single recipients are working fine...I'm user rails 3.2.3, with sqlite3 in dev! I want to fix this before I try it on heroku! |
You can try deploying to Heroku, but I'm pretty sure you'll run into the same issue. Unfortunately, there hasn't been an answer to this issue. You may want to try another messaging gem/generator until this gets resolved (I don't have one to recommend at the moment). |
I am trying to deploy my first rails app to Heroku and seem to be having a problem. After I git push heroku master, and heroku rake db:migrate I get an error in my app that says "We're sorry, but something went wrong." After checking my Heroku log I see the following:
From searching Google I have found a related question on Stackoverflow and this article. It seems that this issue lies in the fact that PostgreSQL is more SQL compliant than MySQL and the "solution to fixing this is to use :select and to select each field that you wish to decorate the resulting object with and group by them." However, I'm not exactly sure how to augment the code in my messages partial to make PostgreSQL happy.
Please note that I'm using the messages partial as generated.
Thanks for the help!
The text was updated successfully, but these errors were encountered: