In the Rails2 world, one could conveniently browse the code of plugins or gems packaged with the app. With Rails3, all the packaged gems are stored as .gem and hence are not browsable or searchable. Now I have to use 'bundle open [gem]' externally to browse gem/plugin code. Does anyone have a better technique to lookup or read gem/plugin code instantly
+1
A:
If you install the "gemedit" gem, you can also use gem edit [gem]
to open the source of the specified gem. However, gem edit doesn't take bundles into account (I guess it only searches the local gem home), so bundle open is probably the better command within a Rails 3 app.
If you want to keep all gems for an app inside a single directory, you might want to try installing the bundle for the app into a separate directory like with bundle install myBundleDir --disable-shared-gems
. This will install all required gems into myBundleDir, ignoring system gems, so you'll have every piece of code that runs your app inside this directory.
Andreas
2010-08-02 15:16:52