Skip to content
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

Rails 5.0.1 placeholders are not working #43

Open
lokanadhamm opened this issue Jul 13, 2017 · 3 comments
Open

Rails 5.0.1 placeholders are not working #43

lokanadhamm opened this issue Jul 13, 2017 · 3 comments

Comments

@lokanadhamm
Copy link

Role.first
Role Load (3130.9ms) SELECT roles.* FROM roles ORDER BY roles.id ASC LIMIT ?
ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1: SELECT roles.* FROM roles ORDER BY roles.id ASC LIMIT ?

@caseyprovost
Copy link

I also get this for all or most queries. It prevents the Rails app from starting.

@lokanadhamm
Copy link
Author

Try setting prepared_statements: false in database.yml

@aquadrehz
Copy link

This's helpful and should put to readme file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants