use bundle open gemname

You can take a peek at a locally installed gem's code very easily in ruby mine.
If you are using another IDE it would require a few extra steps:
First, set BUNDLER_EDITOR in ~/.bashrc or ~/.zshrc (or whatever shell you are using)
export BUNDLER_EDITOR="code"
(code to use VS code)
Then, simply run $ bundle open gemname and voilá! Look at whatever gem you want