A memorandum until the first Ruby on Rails environment was built on a personal Windows 10 PC. By the way, I have only touched Linux (CentOS) and CakaPHP of Windows 10 for the Web system.
It is said that a warning may occur depending on the combination of Ruby 2.7 and Rails 6.0 (or peripheral gems), so select Ruby 2.6.6.
--Download "rubyinstaller-devkit-2.6.6-1-x64.exe" from the link below. https://rubyinstaller.org/downloads/
--Since an error will occur in the installation process using the command line later, stop Windows FW and security software in advance.
--Run the downloaded installer. Check "Use UTF-8 as default external encoding." Check "MSYS 2 development toolchain 2019-10-01" Select the editor "Visual Studio Code"
--Enter and execute with RubyInstaller on the displayed command line.
Now that the Ruby installation is complete, check the version on the command line.
> ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]
Also check the version of gem.
gem -v
3.0.3
--Download the installer from the following site. https://gitforwindows.org/
--Run the downloaded installer. Select "Use Visual Stadio Code as Git's default editor" Select "Use the OpenSSL library" What is extra options
With the above, confirm that an icon such as "Git Bush" has been added to the Windows start menu and exit.
Use nodist to version control Node.js.
--Download the nodist installer from the following site. "NodistSetup-v0.9.1.exe" https://qiita.com/satoyan419/items/56e0b5f35912b9374305
--Install nodist.
--nodist Version confirmation.
>nodist -v
0.9.1
--Install Node.js. Select the latest 12 series (End-of-life: 2022-04-30)
>nodist + 12.19.0
>nodist 12.19.0
>node -v
v12.19.0
--Since the version of nmp is old, update it by referring to the link below. https://nodejs.org/ja/download/releases/
>nodist npm 6.14.8
>npm -v
6.14.8
>npm install -g yarn
>yarn -v
1.22.10
The version was old, so updated to the latest version.
>gem install bundler
>bundler -v
Bundler version 2.1.4
If the user name of the temporary file path is full-width, the temporary file creation will fail, so change the temporary file first and then install.
>set TEMP=C:\Temp
>set TMP=C:\Temp
>gem install sqlite3
>gem install rails -v 6.0.3
>rails -v
Rails 6.0.3
that's all.
Recommended Posts