Ruby newbie: undefined method `with_indifferent_access'

后端 未结 2 696
长情又很酷
长情又很酷 2021-02-19 18:39

I am a new Ruby programmer, and a co-worker of mine to help me get started wrote the following code which ran fine in his environment. However, when I try to run it in my own e

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-19 19:13

    Try using:

    require 'active_support/core_ext/hash'
    

    Thats what actually adds the with_indifferent_access method to the normal Hash class.

提交回复
热议问题