わすれっぽいきみえ

みらいのじぶんにやさしくしてやる

今日やった設定 その3

vagrantをインストールしたのでboxをダウンロードしてーとかいろいろやってた。

参考

そういえばrbenv入れてからgem updateしてなかった。
というわけでupdateしてからrubyの設定をしよう。

Bundlerというのをよく聞くけど、これなんだろうと思って調べてみる。

Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
With Bundler, it can be easy to share your code between development, staging and production machines. Of course, you know how to share your own application or gem: stick it on GitHub and clone it where you need it. Bundler makes it easy to make sure that your application has the dependencies it needs to start up and run without errors.

必要なものを必要なだけインストールする、という発想。パッケージを管理するファイルをシェアするだけで、どこにでも同じ環境が作れる。それを簡単にしてくれるのがBundlerらしい。
PHPにもcomposerというのがあって、slim frameworkとか使うときに使っていた。vimプラグイン管理のためにって導入したneobundle.vimも同じ。
実際便利なんだろうけど、それ以上によく聞くので使えない方が困りそう。
というわけで早速インストールしてみる。といっても超がつくほど簡単。

$ gem install bundler

今日はとりあえずこれだけ。
次はGemfileのいじり方とか調べよう。

gem updateした時のログ。まぁいらなそうだけど。

$ gem update
Updating installed gems
Updating bigdecimal
Fetching: bigdecimal-1.2.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed bigdecimal-1.2.5
Parsing documentation for bigdecimal-1.2.5
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for bigdecimal.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for bigdecimal.o, skipping
Installing ri documentation for bigdecimal-1.2.5
Installing darkfish documentation for bigdecimal-1.2.5
Updating json
Fetching: json-1.8.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed json-1.8.1
Parsing documentation for json-1.8.1
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/json/ext/generator.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/json/ext/parser.bundle, skipping
Installing ri documentation for json-1.8.1
Installing darkfish documentation for json-1.8.1
Updating minitest
Fetching: minitest-5.3.0.gem (100%)
Successfully installed minitest-5.3.0
Parsing documentation for minitest-5.3.0
Installing ri documentation for minitest-5.3.0
Installing darkfish documentation for minitest-5.3.0
Updating psych
Fetching: psych-2.0.4.gem (100%)
Building native extensions.  This could take a while...
Successfully installed psych-2.0.4
Parsing documentation for psych-2.0.4
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/psych.bundle, skipping
Installing ri documentation for psych-2.0.4
Installing darkfish documentation for psych-2.0.4
Updating rake
Fetching: rake-10.1.1.gem (100%)
rake's executable "rake" conflicts with /Users/user/.rbenv/versions/2.0.0-p451/bin/rake
Overwrite the executable? [yN]  y
Successfully installed rake-10.1.1
Parsing documentation for rake-10.1.1
Installing ri documentation for rake-10.1.1
Installing darkfish documentation for rake-10.1.1
Updating rdoc
Fetching: rdoc-4.1.1.gem (100%)
rdoc's executable "rdoc" conflicts with /Users/user/.rbenv/versions/2.0.0-p451/bin/rdoc
Overwrite the executable? [yN]  y
rdoc's executable "ri" conflicts with /Users/user/.rbenv/versions/2.0.0-p451/bin/ri
Overwrite the executable? [yN]  y
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Successfully installed rdoc-4.1.1
Parsing documentation for rdoc-4.1.1
Installing ri documentation for rdoc-4.1.1
Installing darkfish documentation for rdoc-4.1.1
Updating test-unit
Fetching: test-unit-2.5.5.gem (100%)
Successfully installed test-unit-2.5.5
Parsing documentation for test-unit-2.5.5
Installing ri documentation for test-unit-2.5.5
Installing darkfish documentation for test-unit-2.5.5
Gems updated: bigdecimal json minitest psych rake rdoc test-unit