43
36

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gemのディレクトリに一瞬で移動する

Posted at

bundle show [gem]で指定したgemの絶対パスを取得できる。ので、以下のようにすれば、一瞬でgemのホームディレクトリに移動できる。

$ bundle show rails
/Users/naoty/workspace/sampleapp/vendor/bundle/ruby/1.9.1/gems/rails-3.1.0
$ cd `bundle show rails`

ちなみに、bundle open [gem]で指定したgemのディレクトリをエディタで開ける。こっちの方が使うかもしれない。事前に環境変数EDITORを設定しておく必要がある。

$ echo $EDITOR
/usr/bin/vi
$ bundle open rails
43
36
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
43
36

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?