Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 1 comment
  • 2 contributors
Jan 21, 2013
Nahuel Sciaratta Update Readme.md 2495580
Mar 17, 2013
Bruno Bonamin bbonamin Improved support for rbenv
When searching for rbenv, now the plugin tries to load the bundler shim
instead of initializing rbenv directly.
0ea977c

Showing 2 changed files with 29 additions and 1 deletion. Show diff stats Hide diff stats

  1. +28 0 Readme.md
  2. +1 1  SublimeGemBrowser.py
28 Readme.md
Source Rendered
@@ -5,9 +5,37 @@ For Ruby projects using the Bundler gem.
5 5 This plugin allows you to quickly access the code of a gem that you have installed via Bundler in the current project. When you select a gem, a new Sublime Text 2 window will open with the code ready for inspection.
6 6
7 7 Tested on OSX with RVM, Xubuntu with rbenv and Windows with RubyInstaller
  8 +# How to Use
  9 +* In ST2, press "cmd + shift + p" and type "list gem"
  10 +* Once you see "Gem Browser: List Gems", press enter.
  11 +* It will list all the gems that have been installed via bundle for the project folder
  12 + ![ScreenShot](https://dl.dropbox.com/u/1252099/semi-permanent/gembrowser.png)
  13 +* Once you choose a gem of the list, this plugin will open the source of the gem in a new window with the code ready for inspection and EVEN modification in real time (useful for debugging).
  14 +
  15 +# Installation
  16 +
  17 +### Package Control
  18 +Using [Package Control](http://wbond.net/sublime_packages/package_control), a
  19 +package manager for Sublime Text 2.
  20 +
  21 +In ST2, press "cmd + shift + p" and then type "install".
  22 +
  23 +Once you see "Package Control: Install Package", press enter.
  24 +
  25 +When the packages load, another selection window will appear.
  26 +
  27 +Type "gem browser" and enter. All done!
  28 +
  29 +### Manual Installation
  30 +
  31 +```bash
  32 + cd "~/Library/Application Support/Sublime Text 2/Packages/"
  33 + git clone https://github.com/NaN1488/sublime-gem-browser.git
  34 +```
8 35
9 36 ## Known issues / limitations
10 37 * Only tested on Rails 3+ and Bundler 1.0+
  38 +* Doesn't work with projects that use rvm gemsets (yet)
11 39
12 40 ## License
13 41 * MIT License
2  SublimeGemBrowser.py
@@ -59,7 +59,7 @@ def run_subprocess(self, command):
59 59 process = subprocess.Popen(command_with_cd, stdout=subprocess.PIPE, shell=True, executable= rvm_executable)
60 60 return process.communicate()[0]
61 61 else: #Search for rbenv
62   - rbenv_command = 'export PATH="$HOME/.rbenv/bin:$PATH";if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi;' + command_with_cd
  62 + rbenv_command = 'cd ' + current_path + ' && ~/.rbenv/shims/' + command
63 63 process = subprocess.Popen(rbenv_command, stdout=subprocess.PIPE, shell=True)
64 64 output = process.communicate()[0]
65 65 if output != '':

Showing you all comments on commits in this comparison.

Bruno Bonamin
Collaborator

One try at solving #2

Something went wrong with that request. Please try again.