I am running rails3 in Ubuntu and using gedit for coding. I am using RVM. To look at the gem source code I tried: bundle open jquery-rails
That doesn't work since I hadn't setup an editor. After setting gedit as the editor it still doesn't work because gedit can't be passed directories. I guess it only works with files. Too bad :(.
nathan.f77's answer to this question ( Lookup Gem or Plugin code packaged in a Rails3 application ) seems promising, but I wasn't able to follow his instructions. They lacked sufficient detail for me.
What is a very easy way to browse the source files for gems that I am using in my rails3 app?
bundle show jquery-rails
should tell you where the gem source lives on your filesystem. Then open the file that you want.
CubaLibre's response got me half-way there. The other piece of the puzzle I was able to get from Ask Ubuntu.
Here are the steps to browse gem code in gedit using Ubuntu.
a. From the command line run:
gnome-open $(bundle show [gem-name])
b. This will open up the gem directory in nautilus. From there just double click on file you'd like to see and it will open up in gedit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With