0
0

More than 3 years have passed since last update.

Ruby① Windows環境の構築

Posted at

備忘録

インストーラ付きのRubyダウンロード

以下のサイトからWindows用バイナリをダウンロードする。

image.png

image.png

ダウンロードしたexeファイルをダブルクリックする。

image.png

インストーラが起動するので、案内に従ってインストール作業を進め、完了したことを確認する。

image.png

正常にインストールされたことの確認

コマンドプロンプトを立上げ、以下のコマンドを入力する。

ruby -v

正常にインストールされている場合、Rubyのバージョン情報が表示される。
image.png

rubyコマンドを使用したスクリプトの実行

以下の内容をhello.rbという名前のファイルとして作成する。

hello.rb
puts 'Hello, world!'

その後、コマンドプロンプトを開き、ファイルを保存したディレクトリに移動したあとで、以下のコマンドを実行する。

ruby hello.rb

スクリプトが実行され、結果がコマンドプロンプト上に表示される。
image.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