If you run into this rather obscure error message:
tried to create Proc object without a block
One possibility is that you’re using Rails 3.x and you tried to use the new 4.x+ syntax of where.not
. Using the convenient not syntax results in that obscure error message.
The fix is to convert the query to do something like:
relation.where.not(some_column: some_value)
to
relation.where("some_column <> ?", some_value)