Skip to content

ActiveRecord::StatementInvalid when sorting by the "Arguments" column #28

@abevoelker

Description

@abevoelker

Visit http://localhost:3000/queue_classic_admin/queue_classic_jobs?dir=asc&sort=args to reproduce.

PG::UndefinedFunction: ERROR:  could not identify an ordering operator for type json
LINE 1: ...assic_jobs".* FROM "queue_classic_jobs"  ORDER BY args desc ...
                                                             ^
HINT:  Use an explicit ordering operator or modify the query.
: SELECT  "queue_classic_jobs".* FROM "queue_classic_jobs"  ORDER BY args desc NULLS LAST LIMIT 50 OFFSET 0
  Rendered /home/abe/.gem/ruby/2.1.5/gems/queue_classic_admin-0.2.0/app/views/queue_classic_admin/shared/_job_list.html.erb (13.1ms)
  Rendered /home/abe/.gem/ruby/2.1.5/gems/queue_classic_admin-0.2.0/app/views/queue_classic_admin/queue_classic_jobs/index.html.erb within layouts/queue_classic_admin/application (14.5ms)
Completed 500 Internal Server Error in 20ms

Full stacktrace: https://gist.github.com/abevoelker/b00d55553222057bc0bd

This is with Postgres 9.3.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions