Best way to debug third-party gems in ruby

前端 未结 5 1473
孤独总比滥情好
孤独总比滥情好 2020-12-07 18:06

Since there may be a lot of Ghost Methods inside a ruby gem, I don\'t think it is a good idea to study the inner mechanism of a ruby gem just by reading

5条回答
  •  春和景丽
    2020-12-07 18:27

    Both commands output a path to the gem source in your computer.

    # if it is present in your gemfile
    bundle show gemname
    
    # if not in your gemfile
    gem which gemname
    

    Then just open the folder in your text editor of choice, and good debugging!

提交回复
热议问题