Skip to Content

Rails - `bundle open` gem source

Posted on

Have you ever want to put a breakpoint in a gem? I try to debug in gem sometime.

Each time, I always use command: cd ~/.rvm/gems/ruby-2.6.5/gems/gem-name-gem-version. and open this source. But today, I learn something new =)). The bundle open command.

Usage

bundle open GEM_NAME

bundler will open the source code for the exact version of the gem you’ve got installed in your editor. You can search the code inside your editor and even add breakpoints or make code changes locally to test out things.

Reference

comments powered by Disqus