- The easy way to install Ruby on Windows
- Latest News
- RubyInstaller 3.0.0-1 released
- RubyInstaller 2.7.2-1, 2.6.6-2 and 2.5.8-2 released
- RubyInstaller 2.7.1-1, 2.6.6-1, 2.5.8-1 and 2.4.10-1 released
- RubyInstaller 2.7.0-1 released
- RubyInstaller 2.6.5-1, 2.5.7-1 and 2.4.9-1 released
- Is RubyInstaller for you?
- Learn Ruby
- Online Ruby Programming Course
- Online Rails Programming Course
- Downloads
- RubyInstallers Archives
- with Devkit
- without Devkit
- Other Useful Downloads
- 7-Zip Archives
- PGP signature key
- Which version to download?
- How to update?
- RubyInstaller-head
- With Development Kit?
- Speed and Convenience
- Documentation
- Support
- Download Ruby
- Ways of Installing Ruby
- Compiling Ruby — Source Code
- HackWare.ru
- Этичный хакинг и тестирование на проникновение, информационная безопасность
- Как установить и использовать Ruby в Windows
- Для чего устанавливать Ruby
- Как установить Ruby на Windows
- Как обновить Ruby на Windows
- Как установить и использовать gem в Windows
- Как установить bundler
- Как установить программу Ruby в Windows. Как запустить программу Ruby в Windows
- Восстановление сайтов из Интернет Архива в Windows
- Как установить WhatWeb в Windows
- Установка WPScan в Windows
- Что такое MSYS2. Как пользоваться MSYS2
The easy way to install Ruby on Windows
This is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
Latest News
RubyInstaller 3.0.0-1 released
RubyInstaller-3.0.0-1 has been released! It features a whole bunch of great new features and improvements. See the ruby-3.0.0 release post for more details.
RubyInstaller 2.7.2-1, 2.6.6-2 and 2.5.8-2 released
RubyInstaller versions 2.7.2-1, 2.6.6-2 and 2.5.8-2 are released. These are maintenance releases with bug and security fixes.
RubyInstaller 2.7.1-1, 2.6.6-1, 2.5.8-1 and 2.4.10-1 released
RubyInstaller versions 2.7.1-1, 2.6.6-1, 2.5.8-1 and 2.4.10-1 are released. These are maintenance releases with bug and security fixes.
RubyInstaller 2.7.0-1 released
RubyInstaller-2.7.0-1 has been released. See the ruby-2.7.0 release post and the the RubyInstaller CHANGELOG for more details. Please note, that some gems are not yet compatible with Ruby-2.7 on Windows. You should therefore stay on 2.6 until 2.7 is well supported, unless you want to contribute and fix remaining issues.
RubyInstaller 2.6.5-1, 2.5.7-1 and 2.4.9-1 released
RubyInstaller versions 2.6.5-1, 2.5.7-1 and 2.4.9-1 are released. These are maintenance releases with bug and security fixes.
Is RubyInstaller for you?
RubyInstaller is the easiest and most widely-used Ruby environment on Windows. And Ruby is a great language for beginners as well as professionals. It’s suitable for small scripts as well as large applications. RubyInstaller combines the possibilities of native Windows programs with the rich UNIX toolset of MSYS2 and the large repository of MINGW libraries. RubyInstaller is a great foundation for using Ruby for development and production … Read more
Learn Ruby
Online Ruby Programming Course
If you’re new to Ruby, check out this online course from The Pragmatic Studio to learn all the fundamentals of object-oriented programming with Ruby.
Online Rails Programming Course
If you’re looking to create Ruby on Rails web apps, you’ll learn how to build a complete Rails 4 app step-by-step in this online course also from The Pragmatic Studio.
Downloads
RubyInstallers Archives
Not sure what version to download? Please read the right-hand column for recommendations.
with Devkit
- Ruby+Devkit 3.0.0-1 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 3.0.0-1 (x86)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.7.2-1 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.7.2-1 (x86)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.6.6-2 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.6.6-2 (x86)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.5.8-2 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.5.8-2 (x86)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.4.10-1 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.4.10-1 (x86)
- download PGP signature
- SHA256:
without Devkit
- Ruby 3.0.0-1 (x64)
- download PGP signature
- SHA256:
- Ruby 3.0.0-1 (x86)
- download PGP signature
- SHA256:
- Ruby 2.7.2-1 (x64)
- download PGP signature
- SHA256:
- Ruby 2.7.2-1 (x86)
- download PGP signature
- SHA256:
- Ruby 2.6.6-2 (x64)
- download PGP signature
- SHA256:
- Ruby 2.6.6-2 (x86)
- download PGP signature
- SHA256:
- Ruby 2.5.8-2 (x64)
- download PGP signature
- SHA256:
- Ruby 2.5.8-2 (x86)
- download PGP signature
- SHA256:
- Ruby 2.4.10-1 (x64)
- download PGP signature
- SHA256:
- Ruby 2.4.10-1 (x86)
- download PGP signature
- SHA256:
Other Useful Downloads
7-Zip Archives
- Ruby 3.0.0-1 (x64)
- download PGP signature
- SHA256:
- Ruby 3.0.0-1 (x86)
- download PGP signature
- SHA256:
- Ruby 2.7.2-1 (x64)
- download PGP signature
- SHA256:
- Ruby 2.7.2-1 (x86)
- download PGP signature
- SHA256:
- Ruby 2.6.6-2 (x64)
- download PGP signature
- SHA256:
- Ruby 2.6.6-2 (x86)
- download PGP signature
- SHA256:
- Ruby 2.5.8-2 (x64)
- download PGP signature
- SHA256:
- Ruby 2.5.8-2 (x86)
- download PGP signature
- SHA256:
- Ruby 2.4.10-1 (x64)
- download PGP signature
- SHA256:
- Ruby 2.4.10-1 (x86)
- download PGP signature
- SHA256:
PGP signature key
Which version to download?
If you don’t know what version to install and you’re getting started with Ruby, we recommend that you use the Ruby+Devkit 2.7.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. The 32 bit (x86) version is recommended only if custom 32 bit native DLLs or COM objects have to be used.
How to update?
Ruby can be updated to the latest patch version (e.g. from 2.6.1 to 2.6.4) by running the new installer version. Installed gems are not overwritten and will work with the new version without re-installation. It’s sufficient to use the RubyInstaller without Devkit for these update installations. 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-2.6.x installation should not be updated by installing RubyInstaller-2.7.x into the same directory. This is because gems with C extensions are not compatible between ruby-2.6 and 2.7. Find out more in the FAQ.
RubyInstaller-head
RubyInstaller-head is a daily-updated version of the Ruby development branch. It can be used for continuous integration tests (CI) on your gems or applications, so you’re prepared for upcoming changes to the Ruby core. Builds are available on stable download URIs in the github release section. They can be easily integrated into Appveyor.
With Development Kit?
RubyInstaller uses the MSYS2 toolchain as its development kit. It is bundled into the Ruby+Devkit installer version as a selectable component, so that no additional downloads/installs are required. It’s possible to share one Devkit among multiple versions of Ruby.
MSYS2 is required in order to build native C/C++ extensions for Ruby and is necessary for Ruby on Rails. Moreover it allows the download and usage of hundreds of Open Source libraries which Ruby gems often depend on.
The MSYS2 development environment can be activated in a running cmd or powershell console by ridk enable . This adds commands like make , gcc , pacman or sh to the search path. See more in the Wiki.
Speed and Convenience
RubyInstaller is compiled with the latest GCC at the release date. The installed Ruby is a native Windows application but combines this with the rich UNIX toolset of MSYS2 and the large repository of MINGW libraries.
Read more about RubyInstaller and its alternatives here.
Documentation
The Ruby core- and standard library documentation are included as part of the installation. We also recommend the online documentation, or the HTML version downloadable from ruby-doc.org.
Support
Enjoy! Happy Ruby-coding! And let us know what you think, or if you have any issues, at our helpful and friendly RubyInstaller Google Group.
Download Ruby
Here you can get the latest Ruby distributions in your favorite flavor. The current stable version is 3.0.1. Please be sure to read Ruby’s License.
Ways of Installing Ruby
We have several tools on each major platform to install Ruby:
- On Linux/UNIX, you can use the package management system of your distribution or third-party tools (rbenv and RVM).
- On macOS machines, you can use third-party tools (rbenv and RVM).
- On Windows machines, you can use RubyInstaller.
See the Installation page for details on using package management systems or third-party tools.
Of course, you can also install Ruby from source on all major platforms.
Compiling Ruby — Source Code
Installing from the source code is a great solution for when you are comfortable enough with your platform and perhaps need specific settings for your environment. It’s also a good solution in the event that there are no other premade packages for your platform.
See the Installation page for details on building Ruby from source. If you have an issue compiling Ruby, consider using one of the third party tools mentioned above. They may help you.
- Stable releases:
- Ruby 3.0.1
sha256: 369825db2199f6aeef16b408df6a04ebaddb664fb9af0ec8c686b0ce7ab77727 - Ruby 2.7.3
sha256: 8925a95e31d8f2c81749025a52a544ea1d05dad18794e6828709268b92e55338
- Ruby 3.0.1
- In security maintenance phase (will EOL soon!):
- Ruby 2.6.7
sha256: e4227e8b7f65485ecb73397a83e0d09dcd39f25efd411c782b69424e55c7a99e
- Ruby 2.6.7
- Not maintained anymore (EOL):
- Ruby 2.5.9
sha256: f5894e05f532b748c3347894a5efa42066fd11cc8d261d4d9788ff71da00be68
- Ruby 2.5.9
- Snapshots:
- Stable Snapshot of ruby_3_0 branch: This is a tarball of the latest snapshot of the current ruby_3_0 branch.
- Stable Snapshot of ruby_2_7 branch: This is a tarball of the latest snapshot of the current ruby_2_7 branch.
- Stable Snapshot of ruby_2_6 branch: This is a tarball of the latest snapshot of the current ruby_2_6 branch.
- Nightly Snapshot: This is a tarball of whatever is in Git, made nightly. This may contain bugs or other issues, use at your own risk!
For more information about specific releases, particularly older releases or previews, see the Releases page. Information about the current maintenance status of the various Ruby branches can be found on the Branches page.
For information about the Ruby Subversion and Git repositories, see our Ruby Core page.
The Ruby source is available from a worldwide set of Mirror Sites. Please try to use a mirror that is near you.
HackWare.ru
Этичный хакинг и тестирование на проникновение, информационная безопасность
Как установить и использовать Ruby в Windows
Для чего устанавливать Ruby
Ruby — это скриптовый язык, то есть для запуска программ не требуется предварительная компиляция. В этом смысле Ruby является аналогом PHP, Python, PERL и других.
Ruby достаточно популярный язык и на нём написано много интересных программ; если говорить применительно к InfoSec, то в качестве примеров можно привести знаменитые WPScan, WhatWeb, Wayback Machine Downloader и другие.
Установив Ruby на Windows вы сможете запускать программы, написанные на этом языке, а также изучать это язык программирования и писать свои собственные скрипты.
Кстати, Ruby, наравне как и PHP, Python и PERL, может быть модулем веб-сервера и скрипты, написанные на этом языке, можно использовать в качестве программной основы веб-сайта или сервиса.
Как установить Ruby на Windows
Там вы увидите много вариантов установщика, которые различаются не только версиями, но и составом скаченных файлов. Исполнимые файлы являются самодостаточными установщиками для Windows, которые включают язык Ruby, окружение выполнения, важную документацию и прочее. Если вы не знаете, какую версию установить, чтобы начать знакомство с Ruby, то рекомендуется установщик Ruby+Devkit * (x64). Он предоставляет самое большое число совместимых gem (пакеты Ruby) и устанавливает MSYS2-Devkit вместе с Ruby, благодаря чему gem с C-расширениями могут быть скомпилированы сразу после завершения установки.
Запустите скаченный файл. В этом окне мы можем выбрать настройки:
Папку установки можно оставить без изменения.
Add Ruby executables to your PATH – означает добавить каталог с исполнимыми файлами Ruby в системную переменную. Это рекомендуется сделать, чтобы не указывать при каждом запуске скрипта Ruby полный путь до интерпретатора скриптов.
Associate .rb and .rbw files with Ruby installation — означает связать файлы с расширениями .rb и .rbw с установленным Ruby. Благодаря этому файлы Ruby можно будет запускать двойным кликом или набрав имя скрипта в командной строке.
Use UTF-8 as default external encoding – означает использовать кодировку UTF-8 в качестве внешней кодировки по умолчанию.
Я выбрал все три галочки и в качестве папку установки ввёл C:\Ruby26:
Как видно на следующей странице, сам пакет Ruby занимает немного места, но много места занимается предлагаемая к установке набор инструментов разработчика MSYS2. Я настоятельно рекомендую установить MSYS2, поскольку кроме упомянутой выше возможности компилировать пакеты для Ruby, MSYS2 обеспечивает консольное окружение с функциями Linux (примерно как это делает Cygwin, но с дополнительными возможностями).
Оставьте галочку на последнем окне для настройки инструментов разработчика MSYS2 и нажмите Finish.
Далее нам предлагается:
Просто нажимаем ENTER для выполнения всех трёх действий:
Всё завершено, для выхода нажмите ENTER:
Кстати, если вы внимательно смотрели за происходящем на экране, то могли заметить pacman. В этом консольном окружении действительно есть менеджер пакетов pacman. К другим функциями MSYS2 вернёмся чуть позже.
Подробнее о Pacman смотрите в статьях:
Как обновить Ruby на Windows
Для обновления до последнего патча (то есть минорной версии, к примеру с 2.5.1 до 2.5.4), достаточно запустить новую версию установщика. Установленные gem (пакеты из репозитория Ruby), не перезаписываются и будут работать с новой версией без переустановки. Для обновления установки достаточно использовать RubyInstaller без Devkit. Обновить Devkit можно отдельно запустив в командной строке Windows следующую команду:
При выходе новой мажорной версии её нельзя обновить установкой в ту же директорию, что и предыдущая. К примеру, если предыдущая версия установки RubyInstaller-2.5.x, а новая версия RubyInstaller-2.6.x, то её нужно установить либо в новую директорию, либо удалить старую версию и вместо неё установить новую, поскольку gem (программы) с C расширениями не совместимы между ruby-2.5 и 2.6.
Как установить и использовать gem в Windows
RubyGems — это менеджер пакетов для Ruby. С помощью него можно установить различные программы и их зависимости, установку можно делать как из исходного кода на локальной системе, так и с удалённых источников приложений.
Показанная выше установка Ruby также устанавливает и gem, чтобы в этом убедиться выполните команду:
Вы должны увидеть справку по использованию gem.
Чтобы вывести все доступные команды gem, выполните:
Чтобы установить пакет запустите команду вида:
Больше примеров по установке пакетов будет далее.
Чтобы показать справку о команде установки:
К примеру, для установки программы ‘rake’ из локальной директории или удалённого сервера:
Установка пакета ‘rake’ только с удалённого сервера:
Установка ‘rake’, но только версии 0.3.1, даже если имеются неудовлетворённые зависимости, установку сделать в пользовательскую директорию:
Вывести список gem (пакетов), чьё имя начинается на ‘D’:
Вывести список локальный и удалённых gem, чьё имя содержит ‘log’:
gem search log —both
Предыдущая команда используется для поиска пакетов по имени.
Вывести список только удалённых (не локальных) gem, чьё имя содержит ‘log’:
Просмотреть информацию о RubyGems:
Обновить все программы gem в системе:
Обновить локальную версию RubyGems:
Как установить bundler
bundler — это менеджер зависимостей Ruby. Данный менеджер пригодится при установке других программ, написанных на Ruby.
Для установки bundler в Windows выполните:
Для обновления bundle выполните команду:
Если вы устанавливаете программу из исходного кода и там присутствует файл Gemfile, то перейдите в папку с этой программой и выполните в ней команду:
Эта команда установит все перечисленные в файле Gemfile зависимости.
Чтобы увидеть, где установленные с помощью bundle пакеты gem, используйте команду:
Как установить программу Ruby в Windows. Как запустить программу Ruby в Windows
Далее рассмотрим несколько примеров установки и использования программ на Ruby в Windows.
Восстановление сайтов из Интернет Архива в Windows
Начнём с программы Wayback Machine Downloader, которая полностью восстанавливает сайты из веб архива.
Для установки Wayback Machine Downloader достаточно выполнить:
Запустим для проверки работоспособности программы восстановление сайта из Архива Интернета:
Программа успешно завершила работу:
Как установить WhatWeb в Windows
WhatWeb идентифицирует веб-сайты. Цель этой программы ответить на вопрос «Чем является этот веб-сайт?». WhatWeb распознает веб-технологии, в том числе систему управления контентом (CMS), платформы для ведения блогов, пакеты статистики/аналитики, библиоотеки JavaScript, веб-сервера и встроенные устройства. WhatWeb имеет более 1700 плагинов, каждый из которых для распознавания чего-то одного. WhatWeb также идентифицирует номера версий, email адреса, ID аккаунтов, модули веб-платформ, SQL ошибки и прочее.
Начнём с поиска WhatWeb в репозитории пакетов Ruby:
Найдено только simple_whatweb (0.4.1).
Даже если это WhatWeb, то версия очень старая. Поэтому на Windows установим WhatWeb из исходного кода.
Распакуйте эту папку. Откройте командную строку и перейдите в эту папку:
Следующая команда покажет справку по программе:
Запустим проверку сайтов:
Установка WPScan в Windows
Что такое MSYS2. Как пользоваться MSYS2
Мы установили уже MSYS2 для того, чтобы получить доступ к инструментам компиляции, благодаря которым мы сможем установить любой пакет Ruby. На самом деле MSYS2 основывается на Cygwin и содержит большое количество утилит Linux.
MSYS2 предоставляет оболочку bash, Autotools, make, gcc, pacman, sh и многие другие пакеты. Особенно следует отметить менеджер пакетов pacman.
Для активации рабочего окружения MSYS2 откройте командную строку или консоль powershell и выполните там:
В результате сразу станут доступны для работы многие утилиты Linux, а также менеджер пакетов Pacman, с помощью которого можно установить новые пакеты или обновить имеющиеся. При установке пакетов Pacman следит за зависимостями и устанавливает их.