Install Ruby on Windows: Everything You Need to Get Going.
There are several ways to install Ruby: On Windows 10, you can also use the Windows Subsystem for Linux to install one of the supported Linux distributions. The easy way to install Ruby on Windows. This is a self-contained Windows-based installer that includes the Ruby language, an execution environment. Windows · Download Ruby Installer If your machine does not have Ruby, install it. For new ruby users, we recommend you use Ruby · Install.
In order to check out your fresh Ruby install, you need to open a terminal window again. You can then go on to install Ruby on Rails, which is a RubyGem.
However, note that Rails is generally used to develop database-backed web applications. That means that it needs a database server to talk to. It stores its data in a file on disk. So you may want to install one of those on your Windows machine and then generate your Rails app with the option to specify that database driver.
Prefix works with. As mentioned previously, with Windows 10, Microsoft started offering a standard way to run a Linux command line on Windows computers. It is also a good way to get working with Ruby on Windows. You even get your choice of Linux distro.
To use the WSL, you first need to enable it. There are tutorials online that tell you how to do this by running a command in an admin console e. After your computer has rebooted, you can install the Linux distro of your choice from the Microsoft Store. Your spiffy new Ubuntu command line will be available as an app from the Windows menu:. Running that opens a terminal window and kicks off the setup steps for this mini Linux install.
There are only two steps: enter a username and a password. They can be the same as your Windows username and password or different.
After setting that up, you should have a working Bash prompt! There are lots of tutorials online about how to use the Linux command line. From here on, you could probably follow any tutorial on installing Ruby on Ubuntu.
Read on for specific steps to Ruby joy. The easiest way to install Ruby on Ubuntu is with a package manager. Run the following in your Bash terminal:. This will fetch a bunch of packages and then ask you to make sure you want to install them. You can just hit enter to say yes. Then comes more waiting!
This is almost the same list as we got with RubyInstaller. See the Wiki how to verify PGP signatures. X x64 installer. It provides the biggest number of compatible gems and installs the MSYS2 Devkit alongside Ruby, so gems with C-extensions can be compiled immediately. Ruby can be updated to the latest patch version e.
Installed gems are not overwritten and will work with the new version without re-installation. The Devkit can be updated separately using the ridk install command. If the new Ruby version is from a different stable branch, then please use a new target directory for installation.
That is to say, a previous RubyInstaller This is because gems with C extensions are not compatible between ruby Find out more in the FAQ. Click Save. You should see a new tab open with a prompt that looks something like this:.
Check to make sure Ruby is ready to go by running ruby -v. You should see Ruby print its version number and other information, like this:. RUBY 2D.