Ruby Hash :to_proc


Few weeks ago I’ve found interesting bug with Ruby 2.3 and Rails 3.2.22.2. One of my pet projects is too old (haha) and I’m using Rails 3.2.22.2. After system updating to the latest MacOS Sierra, and rbenv with Ruby 2.3, my project starts with exception. Calling any relation raises very strange error:

no implicit conversion of nil into String

After some googling I’ve found that troubles in the my current version of Active Record.

Linked Github issue.

So you can update your Rails to the 3.2.22.5 or use this initializer:

class Hash
  undef_method :to_proc if self.method_defined?(:to_proc)
end