LoginSignup
40

More than 5 years have passed since last update.

rbenv install直後に捗る方法

Last updated at Posted at 2013-02-10

rbenvいいですよね
ただrbenv installする毎にgemを入れ直すのが面倒…
そんな問題を解決するpluginが出てました

sstephenson/rbenv-default-gems · GitHub

作者はrbenvのsstephenson

ruby-buildを実行した際に指定したgemを同時に入れてくれるプラグインです

使い方

rbenv-default-gemsをインストールします

brew install rbenv-default-gems

~/.rbenv/default-gems に以下のような内容を書きます

~/.rbenv/default-gems
bundler
pry

あとはいつも通りrbenv installをするだけ

$ CONFIGURE_OPTS="--with-readline-dir=/usr/local --with-openssl-dir=/usr/local --enable-shared" rbenv install 1.9.3-p385

Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/chiastolite/.rbenv/versions/1.9.3-p385

Downloading ruby-1.9.3-p385.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.gz
Installing ruby-1.9.3-p385...
Installed ruby-1.9.3-p385 to /Users/chiastolite/.rbenv/versions/1.9.3-p385

Fetching: bundler-1.2.3.gem (100%)
Successfully installed bundler-1.2.3
1 gem installed
Fetching: coderay-1.0.8.gem (100%)
Fetching: slop-3.4.3.gem (100%)
Fetching: method_source-0.8.1.gem (100%)
Fetching: pry-0.9.11.4.gem (100%)
Successfully installed coderay-1.0.8
Successfully installed slop-3.4.3
Successfully installed method_source-0.8.1
Successfully installed pry-0.9.11.4
4 gems installed

指定したgemが入ってますね
正直、毎回 gem install bundlerやるのも面倒だなと思っていたのでこれですぐ開発に集中できます

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
40