0
0

More than 1 year has passed since last update.

WindowsへのRubyインストール

Last updated at Posted at 2023-02-20

WindowsにRuby3.2をインストールします。

PC:Windows 10 Home、64 ビット オペレーティング システム、x64 ベース プロセッサ

まずは既存のRubyのバージョンを確認。

コマンドプロンプトにて
$ ruby -v
実行結果
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]

MacではHomebrewを使ってインストールしましたが、Windowsは、RubyInstallerからインストールしてみます。

RubyInstaller

公式のページによると、

Windowsマシンでは、RubyInstallerといったツールが使えます。

とのこと。早速「Ruby+Devkit 3.2.1-1 (x64) 」をダウンロード。
exeを実行して、何も考えず、画面に沿ってインストールしてみた。

3分後

スクリーンショット 2023-02-21 071042.png

インストールできたっぽい。

コマンドプロンプトにて
$ ruby -v
実行結果
ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x64-mingw-ucrt]

これでRuby3.2がWindowsにインストールできました。

Hello World

テキストファイルで、

テキストファイル
puts "Hello World"
実行結果
C:\Rubyscript>ruby Hello.txt
Hello World

できました。

irbもできました。

スクリーンショット 2023-02-21 072338.png

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