Mysql2::Error: 您的 SQL 语法有错误
我刚刚使用这个来切换我的rails app db 从 sqlite3 到 mysql2 ,这似乎工作正常。
但是当我启动我的应用程序时,我现在得到了这样的信息:
A ActionView::Template::Error occurred in pages#dashboard:
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 '== 1) LIMIT 20 OFFSET 0' at line 1: SELECT `tickets`.* FROM `tickets` WHERE (archived == 1) LIMIT 20 OFFSET 0
activerecord (3.0.3) lib/active_record/connection_adapters/abstract_adapter.rb:202:in `log'
不确定在哪里可以使其正常工作。任何帮助将不胜感激。谢谢!
I just used this to switch my rails app db from sqlite3 to mysql2 and that seemed to work out properly.
But when I start up my app I'm now getting this:
A ActionView::Template::Error occurred in pages#dashboard:
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 '== 1) LIMIT 20 OFFSET 0' at line 1: SELECT `tickets`.* FROM `tickets` WHERE (archived == 1) LIMIT 20 OFFSET 0
activerecord (3.0.3) lib/active_record/connection_adapters/abstract_adapter.rb:202:in `log'
Not sure where to look to get this working properly. Any help would be appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
更新
最终做到了
这效果很好。谢谢!
Try this:
Update
Ended up doing
This worked great. Thanks!