Help us understand the problem. What is going on with this article?

rbenv install直後に捗る方法

More than 5 years have passed since last update.

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やるのも面倒だなと思っていたのでこれですぐ開発に集中できます

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした