37
34

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.

実行中のRubyのバージョンを確認する

Posted at

その方法をいくつか。完全に自分用メモ。

rubyコマンドから

多くのunixコマンドと同様です

% ruby --version 
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]

定数から

pry等から実行している状態で確認できます。

[1] pry(main)> RUBY_VERSION                                                                                                                  
=> "2.1.2"

rbenvから

ちょっと毛色が変わりますが、currentに選択されているものを確認します。

% rbenv version
2.1.2 (set by /Users/norifumi/.rbenv/version)

pryで内部の実装を確認する時に「ちゃんと2.1.2の実装を見てる」ことを確認したかったので調べました。

37
34
0

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
37
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?