らいふうっどの閑話休題

興味のあることをゆる~く書いていく

rbenv memo

github.com rubyをアップデートする時にトラブルを対処した時のメモ
Notes when dealing with troubles when updating ruby.

$ rbenv install 2.5.0

rbenv install コマンド実行すると上記issueのエラーに遭遇しました。
When I executed the rbenv install command, I encountered the above error.

issueの回答は、awkが壊れているのではないか?ということでした。
Isn't the answer of issue awk broken? It was that.

調査の結果、下記 issue が見つかりました。
As a result of the investigation, the following issues were found.

awk の issue / issue of awk

gist.github.com 上記 issue の command.sh で、awkが直りました。
Awk has been fixed in command.sh of the above issue.

バージョンの切り替えができない / Cannot switch versions

rbenv で、2.5.0のインストールができましたが、バージョンが切り替わりませんでした。
その時に見つけた情報です。
With rbenv, 2.5.0 was installed, but the version did not switch.
Information found at that time.

Rubyのバージョンが切り替わらない時の対処法!

自分の環境は、zshなので、 .zshrcに下記内容を追記しました。
Since my environment is zsh, I added the following contents to .zshrc.

export PATH="~/.rbenv/shims:/usr/local/bin:$PATH"
eval "$(rbenv init -)"

ruby 2.3.3 => 2.5.0にバージョンアップできました。
ruby 2.3.3 => I was able to upgrade to 2.5.0.

余談 / Digression

jekyll の issue も見つけました。
I also found a jekyll issue.
github.com

bundle exec jekyll serve で起動

理由は、jekyllサイトのローカル環境構築が目的でした。
The reason was to build a local environment for the jekyll site.