LoginSignup
13

More than 3 years have passed since last update.

Windows環境でVSCodeでのRuby on Railsの開発環境構築手順

Posted at

※ Rubyの推奨環境はLinux?とはいえWindowsしか持ってないよ!って人向けです

1.Rubyのインストール

Rubyで開発する上で、最も必要なものはRubyのインストールなので
https://rubyinstaller.org/downloads/
からRuby + Devkitをダウンロードする

ダウンロードしたらexeファイルを実行してインストールをする

インストールしたら、

ruby -v

コマンドを実行、バージョンが表示されたならばOK
バージョンが表示されなければ、Rubyをインストールしたパスの下の/binフォルダにパスを通す

2.Git bashのインストール

https://gitforwindows.org/
からgitをダウンロードし、インストールする

3.VSCodeのインストール、環境整備

https://code.visualstudio.com/
より、VisualStudioCodeをダウンロードし
exeファイルを実行してインストールする

EXTENSIONSを選択し、Rubyを選択してこれもインストールする

rubydevenv.png

その後、VSCode左下の歯車をクリック

検索欄に、「terminal.integrated.shell.windows」と入力して
表示される「Edit in setting.json」をクリックする

rubydevenv2.png

    "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"

と入力する

すると、VSCode下部のターミナルがGit Bashに変更される

ターミナルから、rails コマンドが実行できるので統合開発環境として活用可能に
rubydevenv4.png

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
13