1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rbenvで切り替わらないとき

Last updated at Posted at 2018-10-25

rbenvでrubyのversionを新しくしたいのに切り替わらない.

症状

> rbenv versions
system
# 1.8.7-p249 (set by /Users/bob/.ruby-version)
2.5.3

なんだけど,

> rbenv global 2.5.3

としてもそのまま.

$PATHがダメという解説記事はたくさんあるが,

> which ruby
/Users/bob/.rbenv/shims/ruby

となっており,ちゃんと設定されている.

解決策(こいつは正しくないです.申し訳ない)

> cd ~
> rbenv local 2.5.3

で切り替わりました.なんかあったんだろう.⏎

追記

uasiさんのご指摘を受けての正しい対処法です.症状と原因は下のコメントを読んでください.

> rm ~/.ruby-version
> rbenv versions
  system
  1.8.7-p249
* 2.5.3 (set by /Users/bob/.rbenv/version)
1
1
3

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?