Upgrade and switch Ruby versions on Windows 10

Upgrade and switch Ruby versions on Windows 10

Trying to start a new Ruby on rails project When I typed in the rails (version) new (project name) command, Run the gem install byebug -v '11.1.3' command Error occurred, when I typed the command, Please upgrade the Ruby version Error occurs. Here we will share how to upgrade the version of Ruby on windows and tools to manage it.

Before and after changing the Ruby version this time

Before change: ruby 2.2.6p396 スクリーンショット 2020-10-30 114317.png After change: ruby 2.4.10p364 スクリーンショット 2020-10-30 114332.png

OS environment

--System type: Windows10 Home 64-bit operating system, x64-based processor

Things you need to upgrade the Ruby version on Windows

--uru: ruby version control tool (corresponds to rbenv on Mac) --Ruby version file you want to set this time (https://rubyinstaller.org/downloads/)

Method

  1. Go to the Ruby Download Page and go to Download WITHOUT DEVKIT lower layer Ruby 2.4.10-1 (x64).

  2. Unzip and install. When finished, a Ruby folder will be created directly under C :. (Example: C: Ruby24-x64)

  3. Download uru. スクリーンショット 2020-10-30 121826.png

  4. Unzip and store the uru_rt.exe file in the tools directory directly under C :. (If the tools directory does not exist, create a new one.)

  5. Open PowerShell or Command Prompt and specify C: tools as the current directory. Then run the uru_rt.exe admin install command. スクリーンショット 2020-10-30 120652.png

  6. Execute uru admin add C: Ruby24-x64 / bin command to register ruby in uru. スクリーンショット 2020-10-30 120800.png

  7. Execute the uru ls command and check that ruby is registered in uru. スクリーンショット 2020-10-30 121246.png

  8. Execute the uru 2410p364 command to switch to this ruby 2.4.10. スクリーンショット 2020-10-30 121359.png

  9. Execute the ruby -v command to check if the ruby version has changed. スクリーンショット 2020-10-30 114332.png


Check if the gem install byebug -v '11.1.3' command, which was the problem in the first place, installs normally. スクリーンショット 2020-10-30 122135.png OK

Recommended Posts

Upgrade and switch Ruby versions on Windows 10
Roughly switch between Ruby versions of Windows using junctions
Project ruby and rails version upgrade
Install Java 9 on windows 10 and CentOS 7
Until ruby can be used on windows ...
STS installation and Japanese localization on Windows 10
Change JDK and Tomcat versions on CentOS
How to switch Java versions on Mac
[Easy] How to upgrade Ruby and bundler
Switch between GUI and CUI on CentOS6.
Easily switch Java versions with alias on macOS
switch and EnumMap
Ruby on Rails ~ Basics of MVC and Router ~
[Personal memo] Ruby on Rails environment construction (Windows)
Switch between multiple versions of Java on Mac
Install and switch between multiple Javas on Ubuntu
Ruby and Gem
rbenv versions and ruby -v versions do not match
Easily build Redmine on Windows using WSL2 and Docker
Install rbenv with apt on ubuntu and put ruby
I installed CentOS 8 on Windows 10 using VirtualBox and Vagrant
Ruby on Rails Tutorial Troublesome notes when running on Windows
(Ruby on Rails6) How to create models and tables
Manage multiple versions of Ruby on Mac [macOS + rbenv]
Talk about introducing Ubuntu 20.04 on Windows 10 and text editor
Install Corretto 8 on Windows
[Ruby] Classes and instances
Symbols and Destructive Ruby
[Ruby] Big Decimal and DECIMAL
Install Ruby on Ubuntu 20.04
Ruby on Rails Elementary
Ruby on Rails basics
Ruby classes and instances
Ruby inheritance and delegation
Switch between JDK 7 and JDK 8
Ruby variables and methods
Ruby On Rails Association
M.S. docker on Windows
Problems and solutions while creating index.html.erb in RubyOnRails 4 on Windows 10
Difficulties in building a Ruby on Rails environment (Windows 10) (SQLite3)
How to deal with different versions of rbenv and Ruby
[Ruby on Rails] Infinite scrolling using gem kaminari and jscroll