Where do gems install?

前端 未结 4 1117
没有蜡笔的小新
没有蜡笔的小新 2020-12-12 11:43

I\'m trying to edit one of the gem\'s config files and I can\'t find it. I\'m not sure how I did this in the past.

4条回答
  •  星月不相逢
    2020-12-12 12:25

    If you are editing the gem's installed files, then the gem wasn't implemented correctly, or you are not modifying it correctly.

    Proper gems are usually configured:

    • via an initializer script on config/initializers
    • via monkeypatching on lib
    • via generators provided by the gem itself. These tend to generate lots of files, but they usually have a "initialize" or "install" option for setting up the gem.

提交回复
热议问题