OS X 10.9.4なローカルでHomebrewやrbenvな開発環境でRubyやRailsを再整備するアレコレ

前提として、以前、Homebrew?rbenv?などを使って、チョコチョコ環境は作っていたり使っていたりしていたけど、現状どうなっているのかわからなくなってしまったので、最新の情報収集をして、整備しなおそうと思っているところ

そうそう、昨年、VagrantやChefをハンズオンで勉強するセミンーに参加したので、Vagrant, VirtualBox, Chefなんかも入っている...

やりたいことを列挙しておく

* Rails4の環境を整備して、アプリを作る
* Vagrant/Ansibleの環境を整備して、環境構築の自動化を色々試す

上記のために、まずは、ローカルのMacBookの開発環境を整備したい、という感じ。

以下、今回の作業で必要そうな項目を列挙しておく

* Vagrantなど、各種ソフトウェアのバージョン確認
* それらの最新バージョンへのアップグレード

Vagrantについては、以下のバージョンだった。

```bash
$ vagrant -v
Vagrant version 1.2.7
```

現時点でdmgで提供されいてる最新版が、1.6.3だったので、とりあえず、何も考えずに、dmgダウンロードして、インストール？

取り敢えず、Ruby, Railsあたりから手をつけたいので、まずは、Ruby系のバージョンを以下で色々調査、の前に、rubyやgemやrailsコマンドの在処をチェック

```bash
$ which rails
/Users/{user_name}/.rbenv/shims/rails
$ which ruby
/Users/{user_name}/.rbenv/shims/ruby
$ which gem
/Users/{user_name}/.rbenv/shims/gem
```

そっか、rbenv使って環境作ってたのか...

とりあえず、gemで管理しているものは全てアップデートしちゃえ、ということで、以下を参照しながら

* [初心者は覚えておきたいRubygemsのコマンドまとめ - Qiita](http://qiita.com/muran001/items/14f34b735e0a6b4af98c, "初心者は覚えておきたいRubygemsのコマンドまとめ - Qiita")

事前に対象を把握しておいて

```bash
$ gem outdated
actionmailer (3.2.3 < 4.1.5)
actionpack (3.2.3 < 4.1.5)
activemodel (3.2.3 < 4.1.5)
activerecord (3.2.3 < 4.1.5)
activeresource (3.2.3 < 4.0.0)
activesupport (3.2.3 < 4.1.5)
addressable (2.3.5 < 2.3.6)
akami (1.2.0 < 1.2.2)
arel (3.0.2 < 5.0.1.20140414130214)
berkshelf (2.0.8 < 3.1.5)
bigdecimal (1.1.0 < 1.2.5)
buff-extensions (0.5.0 < 1.0.0)
buff-shell_out (0.1.0 < 0.2.0)
builder (3.0.0 < 3.2.2)
bundler (1.1.3 < 1.7.1)
celluloid (0.14.1 < 0.15.2)
celluloid-io (0.14.1 < 0.15.0)
coffee-rails (3.2.2 < 4.0.1)
coffee-script (2.2.0 < 2.3.0)
coffee-script-source (1.3.1 < 1.7.1)
diff-lcs (1.2.4 < 1.2.5)
execjs (1.3.2 < 2.2.1)
faraday (0.8.8 < 0.9.0)
ffi (1.9.0 < 1.9.3)
gssapi (1.0.3 < 1.1.2)
gyoku (1.1.0 < 1.1.1)
hashie (2.0.5 < 3.2.0)
highline (1.6.19 < 1.6.21)
hike (1.2.1 < 2.1.3)
httpclient (2.2.0.2 < 2.4.0)
httpi (0.9.7 < 2.2.5)
i18n (0.6.4 < 0.6.11)
io-console (0.3 < 0.4.2)
journey (1.0.3 < 1.0.4)
jquery-rails (2.0.2 < 3.1.1)
json (1.8.0 < 1.8.1)
logging (1.6.2 < 1.8.2)
mail (2.4.4 < 2.6.1)
mime-types (1.18 < 2.3)
minitest (2.5.1 < 5.4.0)
multi_json (1.3.4 < 1.10.1)
multipart-post (1.2.0 < 2.0.0)
net-http-persistent (2.9 < 2.9.4)
net-ssh (2.6.8 < 2.9.1)
nio4r (0.5.0 < 1.0.0)
nokogiri (1.5.10 < 1.6.3.1)
nori (1.1.5 < 2.4.0)
polyglot (0.3.3 < 0.3.5)
rack (1.4.1 < 1.5.2)
rack-ssl (1.3.2 < 1.4.1)
rack-test (0.6.1 < 0.6.2)
rails (3.2.3 < 4.1.5)
railties (3.2.3 < 4.1.5)
rake (0.9.2.2 < 10.3.2)
rdoc (3.9.4 < 4.1.1)
retryable (1.3.3 < 1.3.5)
ridley (1.2.5 < 4.0.0)
rspec (2.13.0 < 3.0.0)
rspec-core (2.13.1 < 3.0.4)
rspec-expectations (2.13.0 < 3.0.4)
rspec-mocks (2.13.1 < 3.0.4)
rubygems-update (1.8.24 < 2.4.1)
rubyntlm (0.1.1 < 0.4.0)
sass (3.1.17 < 3.4.1)
sass-rails (3.2.5 < 4.0.3)
savon (0.9.5 < 2.6.0)
serverspec (0.7.6 < 1.14.0)
solve (0.8.0 < 1.2.1)
sprockets (2.1.3 < 2.12.1)
sqlite3 (1.3.6 < 1.3.9)
thor (0.18.1 < 0.19.1)
tilt (1.3.3 < 2.0.1)
timers (1.1.0 < 4.0.0)
treetop (1.4.10 < 1.5.3)
tzinfo (0.3.33 < 1.2.2)
uglifier (1.2.4 < 2.5.3)
uuidtools (2.1.4 < 2.1.5)
varia_model (0.1.1 < 0.4.0)
wasabi (1.0.0 < 3.3.0)
winrm (1.1.2 < 1.2.0)
```

アップデート実行中... (なんだかスゴく時間がかかっている...)

って、やったものの、rubyのバージョンも最新にしたかったことに気づいてやりなおし... まずは、rbenvのrubyを2系にしないといけないが、どうやるんだろう...

```bash
$ brew -v
Homebrew 0.9.4
$ rbenv --help
rbenv 0.3.0
```

rbenvのバージョンが低いせいか、rbenvでインストールできるrubyのバージョンが2.0.0-devまでになっている

rbenvをHomebrewで入れたのか、git cloneで入れたのか覚えていない...

git cloneで入れたなら以下のコマンドでバージョンアップできるっぽい

```bash
$ cd ~/.rbenv
$ git pull
```

Homebrewで入れた場合は、以下を実行する感じ

```bash
$ brew update
$ brew upgrade rbenv ruby-build
```

そっか、Homebrewで管理しているパッケージなどをチェックすればよいのかも？

```bash
$ brew list
gdbm libgpg-error libyaml openssl rbenv ruby
git libksba node pkg-config readline ruby-build
```

ということで、rbenvはbrewでインストールしたっぽいので

```bash
$ brew update
```

したが、以下のエラーが発生

```bash
error: The following untracked working tree files would be overwritten by merge:
Library/Formula/echoprint-codegen.rb
Library/Formula/haxe.rb
Library/Formula/log4shib.rb
Library/Formula/opensaml.rb
Library/Formula/osm2pgsql.rb
Library/Formula/rats.rb
Library/Formula/re2.rb
Library/Formula/rebar.rb
Library/Formula/xml-security-c.rb
Library/Formula/xml-tooling-c.rb
Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
```

updateはスキップして、upgradeを実行

```bash
$ brew upgrade
==> Upgrading 10 outdated packages, with result:
git 1.8.2, libgpg-error 1.11, libksba 1.3.0, node 0.10.1, openssl 1.0.1e, pkg-config 0.28, rbenv 0.4.0, readline 6.2.4, ruby 2.0.0-p0, ruby-build 20130227
==> Upgrading git
==> Downloading http://git-core.googlecode.com/files/git-1.8.2.tar.gz
######################################################################## 100.0%
==> make prefix=/usr/local/Cellar/git/1.8.2 CC=cc CFLAGS= LDFLAGS= install
==> make CC=cc CFLAGS= LDFLAGS=
==> make clean
==> make CC=cc CFLAGS= LDFLAGS=
==> Downloading http://git-core.googlecode.com/files/git-manpages-1.8.2.tar.gz
######################################################################## 100.0%
==> Downloading http://git-core.googlecode.com/files/git-htmldocs-1.8.2.tar.gz
######################################################################## 100.0%
==> Caveats
The OS X keychain credential helper has been installed to:
  /usr/local/bin/git-credential-osxkeychain

The 'contrib' directory has been installed to:
  /usr/local/share/git-core/contrib

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
?  /usr/local/Cellar/git/1.8.2: 1304 files, 26M, built in 84 seconds
==> Upgrading libgpg-error
==> Downloading ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.11.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libgpg-error/1.11
==> make install
?  /usr/local/Cellar/libgpg-error/1.11: 15 files, 164K, built in 31 seconds
==> Upgrading libksba
==> Downloading ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.0.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libksba/1.3.0
==> make install
?  /usr/local/Cellar/libksba/1.3.0: 11 files, 280K, built in 31 seconds
==> Upgrading node
==> Downloading http://nodejs.org/dist/v0.10.1/node-v0.10.1.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/node/0.10.1
==> make install
==> Caveats
Homebrew installed npm.
We recommend prepending the following path to your PATH environment
variable to have npm-installed binaries picked up:
  /usr/local/share/npm/bin
==> Summary
?  /usr/local/Cellar/node/0.10.1: 821 files, 13M, built in 3.9 minutes
==> Upgrading openssl
==> Downloading http://openssl.org/source/openssl-1.0.1e.tar.gz
######################################################################## 100.0%
==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.1e --openssldir=/usr/local/etc/opens
==> make
==> make test
==> make install MANDIR=/usr/local/Cellar/openssl/1.0.1e/share/man MANSUFFIX=ssl
==> Caveats
To install updated CA certs from Mozilla.org:

    brew install curl-ca-bundle

This formula is keg-only: so it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

The OpenSSL provided by OS X is too old for some software.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
?  /usr/local/Cellar/openssl/1.0.1e: 429 files, 15M, built in 4.0 minutes
==> Upgrading pkg-config
==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/pkg-config/0.28 --disable-host-tool --with-internal-g
==> make
==> make check
==> make install
?  /usr/local/Cellar/pkg-config/0.28: 10 files, 600K, built in 72 seconds
==> Upgrading rbenv
==> Downloading https://github.com/sstephenson/rbenv/tarball/v0.4.0
######################################################################## 100.0%
==> Caveats
To use Homebrew's directories rather than ~/.rbenv add to your profile:
  export RBENV_ROOT=/usr/local/var/rbenv

To enable shims and autocompletion add to your profile:
  if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
==> Summary
?  /usr/local/Cellar/rbenv/0.4.0: 31 files, 152K, built in 6 seconds
==> Upgrading readline
==> Downloading http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz
######################################################################## 100.0%
==> Patching
patching file callback.c
patching file input.c
patching file patchlevel
patching file support/shobj-conf
patching file vi_mode.c
==> ./configure --prefix=/usr/local/Cellar/readline/6.2.4 --mandir=/usr/local/Cellar/readline/6.
==> make install
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.

OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/readline/lib
    CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
?  /usr/local/Cellar/readline/6.2.4: 29 files, 1.1M, built in 22 seconds
==> Upgrading ruby
==> Downloading http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/ruby/2.0.0-p0 --enable-shared --disable-tcltk-framewo
==> make
==> make install
==> Caveats
NOTE: By default, gem installed binaries will be placed into:
  /usr/local/opt/ruby/bin

You may want to add this to your PATH.
==> Summary
?  /usr/local/Cellar/ruby/2.0.0-p0: 864 files, 18M, built in 3.2 minutes
==> Upgrading ruby-build
==> Installing ruby-build dependency: autoconf
==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/autoconf/2.69
==> make install
?  /usr/local/Cellar/autoconf/2.69: 69 files, 2.0M, built in 14 seconds
==> Installing ruby-build
==> Downloading https://github.com/sstephenson/ruby-build/tarball/v20130227
######################################################################## 100.0%
==> ./install.sh
?  /usr/local/Cellar/ruby-build/20130227: 72 files, 320K, built in 4 seconds
```

なぜ、ビールのアイコン？

んで、再度、先ほどエラーになってスキップしたbrew updateを確認するも再びエラー

```bash
$ brew update
error: The following untracked working tree files would be overwritten by merge:
Library/Formula/echoprint-codegen.rb
Library/Formula/haxe.rb
Library/Formula/log4shib.rb
Library/Formula/opensaml.rb
Library/Formula/osm2pgsql.rb
Library/Formula/rats.rb
Library/Formula/re2.rb
Library/Formula/rebar.rb
Library/Formula/xml-security-c.rb
Library/Formula/xml-tooling-c.rb
Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin　refs/heads/master:refs/remotes/origin/master
```

いくつか対処法はあるらしいけど、以下のコマンドが一番手軽そうだったので実行

```bash
$ cd `brew --prefix`
$ git fetch origin
$ git reset --hard origin/master
$ brew update
Already up-to-date.
```

ということで、無事、brew updateは実行できたけど、rbenvでインストール可能なrubyのバージョンに、最新の安定板2.1.2がリストされない...

```bash
$ rbenv install -l
Available versions:
  1.8.6-p383
  1.8.6-p420
  1.8.7-p249
  1.8.7-p302
  1.8.7-p334
  1.8.7-p352
  1.8.7-p357
  1.8.7-p358
  1.8.7-p370
  1.8.7-p371
  1.9.1-p378
  1.9.2-p180
  1.9.2-p290
  1.9.2-p318
  1.9.2-p320
  1.9.3-dev
  1.9.3-p0
  1.9.3-p125
  1.9.3-p194
  1.9.3-p286
  1.9.3-p327
  1.9.3-p362
  1.9.3-p374
  1.9.3-p385
  1.9.3-p392
  1.9.3-preview1
  1.9.3-rc1
  2.0.0-dev
  2.0.0-p0
  2.0.0-preview1
  2.0.0-preview2
  2.0.0-rc1
  2.0.0-rc2
  2.1.0-dev
  jruby-1.5.6
  jruby-1.6.3
  jruby-1.6.4
  jruby-1.6.5
  jruby-1.6.5.1
  jruby-1.6.6
  jruby-1.6.7
  jruby-1.6.7.2
  jruby-1.6.8
  jruby-1.7.0
  jruby-1.7.0-preview1
  jruby-1.7.0-preview2
  jruby-1.7.0-rc1
  jruby-1.7.0-rc2
  jruby-1.7.1
  jruby-1.7.2
  jruby-1.7.3
  maglev-1.0.0
  maglev-1.1.0-dev
  rbx-1.2.4
  rbx-2.0.0-dev
  rbx-2.0.0-rc1
  ree-1.8.6-2009.06
  ree-1.8.7-2009.09
  ree-1.8.7-2009.10
  ree-1.8.7-2010.01
  ree-1.8.7-2010.02
  ree-1.8.7-2011.03
  ree-1.8.7-2011.12
  ree-1.8.7-2012.01
  ree-1.8.7-2012.02
```

いくつか情報を見てみると、ruby-buildが原因っぽいと思われたので、brewのruby-buildのバージョンを確認してみたところ

```bash
$ brew info ruby-build
ruby-build: stable 20140702, HEAD
https://github.com/sstephenson/ruby-build
/usr/local/Cellar/ruby-build/20120423 (44 files, 188K)
/usr/local/Cellar/ruby-build/20130227 (72 files, 320K) *
  Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/ruby-build.rb
==> Dependencies
Recommended: autoconf ✔, pkg-config ✔, openssl ✘
==> Options
--without-autoconf
Build without autoconf support
--without-openssl
Build without openssl support
--without-pkg-config
Build without pkg-config support
--HEAD
install HEAD version
```

どうやらbrew upgradeで最新バージョンになっていなかった様子

```bash
$ brew upgrade ruby-build
==> Upgrading 1 outdated package, with result:
ruby-build 20140702
==> Upgrading ruby-build
==> Installing ruby-build dependency: openssl
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/openssl-1.0.1i.mavericks.bo
######################################################################## 100.0%
==> Pouring openssl-1.0.1i.mavericks.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

The OpenSSL provided by OS X is too old for some software.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
?  /usr/local/Cellar/openssl/1.0.1i: 430 files, 15M
==> Installing ruby-build
==> Downloading https://github.com/sstephenson/ruby-build/archive/v20140702.tar.gz
######################################################################## 100.0%
==> ./install.sh
?  /usr/local/Cellar/ruby-build/20140702: 122 files, 524K, built in 15 seconds

$ brew info ruby-build
ruby-build: stable 20140702, HEAD
https://github.com/sstephenson/ruby-build
/usr/local/Cellar/ruby-build/20120423 (44 files, 188K)
/usr/local/Cellar/ruby-build/20130227 (72 files, 320K)
  Built from source
/usr/local/Cellar/ruby-build/20140702 (122 files, 524K) *
  Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/ruby-build.rb
==> Dependencies
Recommended: autoconf ✔, pkg-config ✔, openssl ✔
==> Options
--without-autoconf
Build without autoconf support
--without-openssl
Build without openssl support
--without-pkg-config
Build without pkg-config support
--HEAD
install HEAD version
```

ということで、ようやく、再度、rbenvでインストール可能なrubyのバージョンを確認すると... 2.1.2がリストされた

```bash
$ rbenv install -l
Available versions:
  1.8.6-p383
  1.8.6-p420
  1.8.7-p249
  1.8.7-p302
  1.8.7-p334
  1.8.7-p352
  1.8.7-p357
  1.8.7-p358
  1.8.7-p370
  1.8.7-p371
  1.8.7-p374
  1.8.7-p375
  1.9.1-p378
  1.9.1-p430
  1.9.2-p0
  1.9.2-p180
  1.9.2-p290
  1.9.2-p318
  1.9.2-p320
  1.9.2-p326
  1.9.3-dev
  1.9.3-p0
  1.9.3-p125
  1.9.3-p194
  1.9.3-p286
  1.9.3-p327
  1.9.3-p362
  1.9.3-p374
  1.9.3-p385
  1.9.3-p392
  1.9.3-p429
  1.9.3-p448
  1.9.3-p484
  1.9.3-p545
  1.9.3-p547
  1.9.3-preview1
  1.9.3-rc1
  2.0.0-dev
  2.0.0-p0
  2.0.0-p195
  2.0.0-p247
  2.0.0-p353
  2.0.0-p451
  2.0.0-p481
  2.0.0-preview1
  2.0.0-preview2
  2.0.0-rc1
  2.0.0-rc2
  2.1.0
  2.1.0-dev
  2.1.0-preview1
  2.1.0-preview2
  2.1.0-rc1
  2.1.1
  2.1.2
  2.2.0-dev
  jruby-1.5.6
  jruby-1.6.3
  jruby-1.6.4
  jruby-1.6.5
  jruby-1.6.5.1
  jruby-1.6.6
  jruby-1.6.7
  jruby-1.6.7.2
  jruby-1.6.8
  jruby-1.7.0
  jruby-1.7.0-preview1
  jruby-1.7.0-preview2
  jruby-1.7.0-rc1
  jruby-1.7.0-rc2
  jruby-1.7.1
  jruby-1.7.10
  jruby-1.7.11
  jruby-1.7.12
  jruby-1.7.13
  jruby-1.7.2
  jruby-1.7.3
  jruby-1.7.4
  jruby-1.7.5
  jruby-1.7.6
  jruby-1.7.7
  jruby-1.7.8
  jruby-1.7.9
  jruby-9000+graal-dev
  jruby-9000-dev
  maglev-1.0.0
  maglev-1.1.0-dev
  maglev-2.0.0-dev
  mruby-1.0.0
  mruby-dev
  rbx-1.2.4
  rbx-2.0.0
  rbx-2.0.0-dev
  rbx-2.0.0-rc1
  rbx-2.1.0
  rbx-2.1.1
  rbx-2.2.0
  rbx-2.2.1
  rbx-2.2.10
  rbx-2.2.2
  rbx-2.2.3
  rbx-2.2.4
  rbx-2.2.5
  rbx-2.2.6
  rbx-2.2.7
  rbx-2.2.9
  ree-1.8.6-2009.06
  ree-1.8.7-2009.09
  ree-1.8.7-2009.10
  ree-1.8.7-2010.01
  ree-1.8.7-2010.02
  ree-1.8.7-2011.03
  ree-1.8.7-2011.12
  ree-1.8.7-2012.01
  ree-1.8.7-2012.02
  topaz-dev
```

あとは、2.1.2インストールして、それぞれ設定するだけ

```bash
$ rbenv install 2.1.2
Downloading ruby-2.1.2.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/f22a6447811a81f3c808d1c2a5ce3b5f5f0955c68c9a749182feb425589e6635
Installing ruby-2.1.2...
Installed ruby-2.1.2 to /Users/{user_name}/.rbenv/versions/2.1.2

$ rbenv global 2.1.2
$ rbenv rehash
$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
```

gemの内容を見てみると...

```bash
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.4)
io-console (0.4.2)
json (1.8.1)
minitest (4.7.5)
psych (2.0.5)
rake (10.1.0)
rdoc (4.1.0)
test-unit (2.1.2.0)
```

ほとんど何もない... ですよね。

```bash
$ gem install bundler
$ gem install rails
$ rbenv rehash
```

ということで、取り敢えず、Ruby on Railsを現時点で最新版の構成、ruby2.1.2.+rails4.1.5にアップデートできたので、一旦、完了

VagrantやAnsibleについては、また次のタイミングで