我们编写了一个程序,需要在Linux上的WINE下一直运行具有用户界面(但不需要运行)。想要像Windows服务一样对待。
我们尝试过在互联网上不同地方发现的众多选项。像--nogui或/ nogui这样的选项,但它似乎不起作用。
有没有人这样做并且之前成功了?
答案 0 :(得分:0)
> Profile.includes(:ratings).where('ratings.count > 1').references(:ratings).count
(55.3ms) SELECT COUNT(DISTINCT "profiles"."id") FROM "profiles" LEFT OUTER JOIN "ratings" ON "ratings"."profile_id" = "profiles"."id" WHERE (ratings.count > 1)
ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: aggregate functions are not allowed in WHERE
LINE 1: ...N "ratings"."profile_id" = "profiles"."id" WHERE (ratings.co...
^
: SELECT COUNT(DISTINCT "profiles"."id") FROM "profiles" LEFT OUTER JOIN "ratings" ON "ratings"."profile_id" = "profiles"."id" WHERE (ratings.count > 1)
> Profile.joins(:ratings).where('ratings.count > 1').count
(40.4ms) SELECT COUNT(*) FROM "profiles" INNER JOIN "ratings" ON "ratings"."profile_id" = "profiles"."id" WHERE (ratings.count > 1)
ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: aggregate functions are not allowed in WHERE
LINE 1: ...N "ratings"."profile_id" = "profiles"."id" WHERE (ratings.co...
^
: SELECT COUNT(*) FROM "profiles" INNER JOIN "ratings" ON "ratings"."profile_id" = "profiles"."id" WHERE (ratings.count > 1)
您的应用程序需要运行无限循环,因此请勿终止。
问候