I recommend using Chocolatey to manage your ruby installation.
It's a unix style package manager for windows.
It's quite easy to install, you can find instructions on their website.
In cmd.exe (run as administrator):
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Then you can install ruby:
choco install ruby
And upgrade it later:
choco upgrade ruby
Answer from sokkyoku on Stack OverflowI recommend using Chocolatey to manage your ruby installation.
It's a unix style package manager for windows.
It's quite easy to install, you can find instructions on their website.
In cmd.exe (run as administrator):
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Then you can install ruby:
choco install ruby
And upgrade it later:
choco upgrade ruby
The easiest way for you might be to use RubyInstaller, which its version 2.0.0-p0 is now available for download as installers. Follow the link http://rubyinstaller.org/ for more information.
Why, When, and How to Upgrade the Ruby Version in Your Project
How do you install old ruby versions?
Help Upgrade Ruby version from 2.3.8
How can I downgrade to ruby 2.7.0 on a Mac?
I use rbenv which is not quite as invasive as rvm. I can have multiple versions installed and do things like:
rbenv install 3.0.0 # Need to also have ruby-build installed.
rbenv global 2.7.0 # This version will be used when not overridden by the next command.
rbenv local 2.7.3 # Will use this only in current directory.
More on reddit.comVideos
I used to Linux mint and mise as ruby version manager. Most of the time I work with old project with ruby version 2.6.3, 2.7.8 and so on.
I've tried CachyOS Hyprland recently and want to make it as main system. And I failed to install old ruby versions, it's always some error with old gcc or old openssl and old whatever.
I can't simply dockerize application or upgrade ruby version on project, I am pretty used to have ruby system-wide installed. Is there any way to install old ruby version without pain?
There are two major Ruby version managers out there from which you can choose:
rbenvandruby-build- RVM
These allow you to keep multiple versions of Ruby on the same system. Once you've installed a version manager, and installed your own Ruby version, you won't mess with your system's Ruby and its Gems, which is the greatest benefit. No more sudo! No more permissions errors and Gem conflicts.
Which one should I choose?
Both do the same thing, but they follow different philosophies. The choice is up to you.
I personally recommend rbenv for its simplicity. I've been using it for years and it has always worked well.
How do I install them?
If you choose rbenv:
- Follow the all the installation and setup instructions.
- Install
ruby-build - Run
rbenv install x.x.xwherex.x.xis the version (userbenv install --listto see which ones are available - Run
rbenv global x.x.xto change your global Ruby version
If you choose RVM:
- Use the secure installation method
- Read the installation instructions — you probably want the single-user configuration
- Use
rvm list knownto list available Rubies and then runrvm install x.x.xto install a specific version. - Use
rvm use x.x.x --defaultto change your default Ruby
I think rbenv deserves at least its own answer.
There is a constant battle between fans of rbenv and those of RVM but I personally like rbenv a lot more. As the Sam Stephenson (the author) states, rbenv it solely concerned with switching Ruby versions (as opposed to RVM, which does a lot more).
On OS X, it's especially easy to give it a try. Just follow the excellent installation instructions on the Github page (if you have Homebrew installed, it's basically just a brew install rbenv ruby-build).
As for switching Rails versions, I once wrote an article about that which my be of interest for you.
Hello, I hope you're all doing great.
We have an old project at working using ruby:2.3.8 and rails 4.0.5 this week the docker image didn't build because of some expired packages on Debian this step fail 'RUN echo "deb http://archive.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list" it's a big project now I have to upgrade it to solve the build project I don't have any experience with Ruby what is the best approach to follow.
Thanks for the help