Program ruby in windows

Содержание
  1. Скачать Ruby
  2. Способы установки Ruby
  3. Компиляция Ruby – Исходный код
  4. Скачать
  5. RubyInstaller Архивы
  6. С Devkit
  7. Без Devkit
  8. Другие полезные дополнения
  9. 7-Zip архивы
  10. Какую версию загружать?
  11. Как обновлять?
  12. RubyInstaller-head
  13. Какую версию Development Kit выбрать?
  14. RubyInstaller-head
  15. With Development Kit?
  16. Скорость и удобство
  17. Документация
  18. Поддержка
  19. Установщик Ruby для Windows
  20. Новости
  21. Вышел установщик Ruby 3.0.0-1
  22. Вышли версии установщика Ruby 2.7.2-1, 2.6.6-2 и 2.5.8-2
  23. Новые версии RubyInstaller 2.7.1-1, 2.6.6-1, 2.5.8-1 и 2.4.10-1
  24. Новая версия RubyInstaller 2.7.0-1
  25. Новые версии RubyInstaller 2.6.5-1, 2.5.7-1 и 2.4.9-1
  26. Подойдёт ли мне RubyInstaller?
  27. Изучай Ruby
  28. Бесплатный курс RubyRush
  29. Книга-учебник Майкла Хартла по Rails (english)
  30. Ethical hacking and penetration testing
  31. InfoSec, IT, Kali Linux, BlackArch
  32. How to install and use Ruby on Windows
  33. Why install Ruby
  34. How to install Ruby on Windows
  35. How to update Ruby on Windows
  36. How to install and use gem on Windows
  37. How to install bundler
  38. How to install the Ruby program on Windows. How to run a Ruby program on Windows
  39. Recovering sites from the Internet Archive in Windows
  40. How to Install WhatWeb on Windows
  41. How to install WPScan on Windows
  42. What is MSYS2. How to use MSYS2
  43. How to configure Ruby as an Apache module on Windows

Скачать Ruby

Здесь вы найдете последние дистрибутивы Ruby на любой вкус. Текущая стабильная версия 3.0.1. Пожалуйста, ознакомьтесь с лицензией Ruby.

Способы установки Ruby

У нас имеются инструменты для всех основных платформ для установки Ruby:

  • На Linux/UNIX, вы можете использовать систему управления пакетами вашей операционной системы или сторонние инструменты (rbenv и RVM).
  • На macOS вы можете использовать сторонние инструменты (rbenv и RVM).
  • На Windows вы можете использовать RubyInstaller.

Смотрите на странице Установка подробности об использовании систем управления пакетами или сторонних инструментов.

И конечно, вы можете также установить Ruby из исходников на всех основных платформах.

Компиляция Ruby – Исходный код

Установка из исходного кода – отличный способ для тех, кто хорошо знаком со своей платформой и кому, возможно, нужны специальные настройки для своего окружения. Это также хорошее решение в случае, когда для вашей платформы нет готовых собранных пакетов.

Смотрите на странице Установка подробности о сборке Ruby из исходников. Если у вас возникла сложность с компиляцией Ruby, попробуйте один из сторонних инструментов из следующей секции. Они могут помочь вам.

  • Стабильные релизы:
    • Ruby 3.0.1
      sha256: 369825db2199f6aeef16b408df6a04ebaddb664fb9af0ec8c686b0ce7ab77727
    • Ruby 2.7.3
      sha256: 8925a95e31d8f2c81749025a52a544ea1d05dad18794e6828709268b92e55338
  • На стадии поддержки безопасности (скоро будет остановлена!):
    • Ruby 2.6.7
      sha256: e4227e8b7f65485ecb73397a83e0d09dcd39f25efd411c782b69424e55c7a99e
  • Больше не поддерживается (EOL):
    • Ruby 2.5.9
      sha256: f5894e05f532b748c3347894a5efa42066fd11cc8d261d4d9788ff71da00be68
  • Слепки:
    • Стабильный слепок ветки ruby_3_0: Это архив свежайшего слепка текущей ветки ruby_3_0 .
    • Стабильный слепок ветки ruby_2_7: Это архив свежайшего слепка текущей ветки ruby_2_7 .
    • Стабильный слепок ветки ruby_2_6: Это архив свежайшего слепка текущей ветки ruby_2_6 .
    • Nightly-слепок: Это архив того, что есть в Git, сделанный ночью. Может содержать баги и прочие ошибки, используйте его на свой страх и риск!

Для получения дополнительной информации по определенным релизам, в частности, про старые или предварительные релизы, обратитесь к странице со списком релизов. Информацию о текущем состоянии поддержки различных веток Ruby можно найти на странице ветвей.

Информацию про Ruby-репозитории Subversion и Git, пожалуйста, посмотрите на странице о ядре Ruby.

Исходный код Ruby доступен по всему миру на нескольких зеркальных сайтах. Пожалуйста, попробуйте использовать зеркало, которое находится недалеко от вас.

Скачать

RubyInstaller Архивы

Не знаете, какую версию выбрать? Тогда прочтите инструкцию справа.

С Devkit

  • Ruby+Devkit 3.0.0-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 3.0.0-1 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 2.7.2-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 2.7.2-1 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 2.6.6-2 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 2.6.6-2 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 2.5.8-2 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 2.5.8-2 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 2.4.10-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby+Devkit 2.4.10-1 (x86)
    • загрузить GPG-подпись
    • SHA256:

Без Devkit

  • Ruby 3.0.0-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 3.0.0-1 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.7.2-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.7.2-1 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.6.6-2 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.6.6-2 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.5.8-2 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.5.8-2 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.4.10-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.4.10-1 (x86)
    • загрузить GPG-подпись
    • SHA256:

Другие полезные дополнения

7-Zip архивы

  • Ruby 3.0.0-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 3.0.0-1 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.7.2-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.7.2-1 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.6.6-2 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.6.6-2 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.5.8-2 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.5.8-2 (x86)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.4.10-1 (x64)
    • загрузить GPG-подпись
    • SHA256:
  • Ruby 2.4.10-1 (x86)
    • загрузить GPG-подпись
    • SHA256:
Читайте также:  Как поменять файловую систему линукс

Какую версию загружать?

Если вы не знаете, какую версию RubyInstaller установить и только начинаете работать с Ruby, то используйте установщик Ruby+DevKit 2.7.x (x64). Он содержит наибольшее количество совместимых гемов и устанавливает MSYS2-DevKit вместе с Ruby, потому гемы с расширением C скомпилируются сразу же. 32-битную (x86) версию советуем, только если приходится работать с пользовательскими 32-битными встроенными DLL- или COM-объектами.

Как обновлять?

Обновите Ruby до свежего патча (например, с версии 2.5.1 до 2.5.4), запустив соответствующую версию установщика. Существующие гемы не перезапишутся и будут стабильно работать с новыми версиями. Используйте RubyInstaller (без DevKit), чтобы обновить установки. Сам DevKit обновляйте отдельно с помощью команды ridk install .

Если вы загружаете версию Ruby из другой стабильной ветки (2.7.x, например), используйте новую директорию для этого. То есть не следует обновлять RubyInstaller-2.5.x до версии 2.7.x, так как гемы с расширением C несовместимы между Ruby 2.6 и 2.7. Больше информации об этом в разделе FAQ.

RubyInstaller-head

RubyInstaller-head – это ежедневно обновляемая версия Ruby development branch. Ее можно использовать для тестов непрерывной интеграции (CI) ваших гемов или приложений, чтобы вы были готовы к ближайшим изменениям ядра руби. Сборки доступны на URI стабильной загрузки в разделе github release. Их можно с легкостью интегрировать в Appveyor.

Какую версию Development Kit выбрать?

Для Ruby 2.4.0 и новее в качестве комплекта разработки используется пакет MSYS2. Он входит в состав Ruby+DevKit как компонент по выбору, чтобы не было нужды скачивать/устанавливать MSYS2 дополнительно. Если используете Ruby без DevKit, то MSYS2 DevKit устанавливайте отдельно командой ridk install

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 that 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 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 for multiple Ruby versions.

MSYS2 требуется, чтобы компилировать дополнения на C/C++ для Ruby. Он необходим также для Ruby on Rails. Более того, MSYS2 позволяет загружать и использовать сотни Open Source библиотек, от которых могут зависеть некоторые гемы.

Среду разработки MSYS2 запускайте в консоли с помощью ridk enable . Она добавляет команды make , gcc , pacman или sh к пути поиска. Больше информации в вики.

Скорость и удобство

RubyInstaller компилируется с помощью GCC в дату выхода. Установленный Ruby — это нативное Windows-приложение, которое работает вкупе с функциональным дистрибутивом MSYS2 и MINGW-библиотеками.

Ищите больше о RubyInstaller и его альтернативах здесь.

Документация

Основы и документация стандартной библиотеки Ruby входит в установочный пакет. Мы рекомендуем почитать ещё и online-вариант или HTML-версию, которую можно скачать на ruby-doc.org.

Поддержка

Делитесь вашим мнением о RubyInstaller или предлагайте улучшения в нашей дружелюбной и полезной Google Группе. Счастливого программирования на Ruby!

Установщик Ruby для Windows

. который работает на Windows и включает в себя язык Ruby, среду выполнения, важную документацию и многое другое.

Новости

Вышел установщик Ruby 3.0.0-1

Вышел установщик Ruby 3.0.0-1! Он добавляет в руби много классных фич и улучшений. Читайте пост про релиз ruby-3.0.0, если хотите подробностей.

Вышли версии установщика Ruby 2.7.2-1, 2.6.6-2 и 2.5.8-2

Вышли версии установщика Ruby 2.7.2-1, 2.6.6-2 и 2.5.8-2. Это служебные обновления с исправлениями ошибок и проблем безопасности.

Новые версии RubyInstaller 2.7.1-1, 2.6.6-1, 2.5.8-1 и 2.4.10-1

Вышли новые версии установщика RubyInstaller 2.7.1-1, 2.6.6-1, 2.5.8-1 и 2.4.10-1. В рамках поддержки исправлены ошибки и уязвимости.

Новая версия RubyInstaller 2.7.0-1

Вышла версия 2.7.0-1 установщика Ruby. Читайте подробнее пост о релизе ruby-2.7.0 и журнал изменений проекта установщика Ruby. Обратите, пожалуйста, внимание на то, что некоторые гемы еще не совместимы с версией Ruby 2.7 на Windows. Поэтому советуем вам оставаться на версии 2.6 до тех пор, пока версия 2.7 не начнет полноценно поддерживаться – если только у вас нет желания внести свой вклад в исправление оставшихся ошибок.

Новые версии RubyInstaller 2.6.5-1, 2.5.7-1 и 2.4.9-1

Вышли версии 2.6.5-1, 2.5.7-1 и 2.4.9-1 установщика Ruby. Это корректировочные версии: исправлены баги и проблемы безопасности.

Подойдёт ли мне RubyInstaller?

RubyInstaller — это простое и популярное Ruby-окружение для Windows. Ruby — выразительный язык, который подходит как для новичков, так и для продвинутых разработчиков; как для небольших скриптов, так и для сложных приложений. RubyInstaller соединяет возможности стандартных виндоусовских программ с функциональным дистрибутивом MSYS2 и MINGW-библиотеками. Это отличный фундамент для ежедневной разработки на языке Ruby и деплоя …Читать далее

Читайте также:  Установочный файл для mac os

Изучай Ruby

Бесплатный курс RubyRush

Бесплатный пошаговый курс с домашними заданиями. С нуля до понимания основ профессионального программирования. Есть телеграм-чат поддержки.

Книга-учебник Майкла Хартла по Rails (english)

Лучшая книга для тех, кому надо быстро погрузиться и начать работать со свежими Rails, RSpec и Ruby.

Ethical hacking and penetration testing

InfoSec, IT, Kali Linux, BlackArch

How to install and use Ruby on Windows

Why install Ruby

Ruby is a scripting language, that is, pre-compilation is not required to run programs. In this sense, Ruby is an analogue of PHP, Python, PERL and others.

Ruby is a fairly popular language and many interesting programs are written on it; in scope of InfoSec, the well-known WPScan, WhatWeb, Wayback Machine Downloader and others can be cited as examples.

By installing Ruby on Windows, you can run programs written in this language, as well as learn this programming language and write your own scripts.

By the way, Ruby, like PHP, Python and PERL, can be a web server module, and scripts written in this language can be used as backend of a website or service.

How to install Ruby on Windows

There you will see many installer options that differ not only in versions, but also in the composition of the downloaded files. Executable files are self-contained installers for Windows that include the Ruby language, runtime, important documentation, and more. If you do not know which version to install in order to get started with Ruby, the Ruby+Devkit * (x64) is recommended. It provides the largest number of compatible gem (Ruby packages) and installs MSYS2-Devkit along with Ruby, so gem with C-extensions can be compiled immediately after installation.

Run the downloaded file. In this window we can select the settings:

The installation folder can be left unchanged.

Add Ruby executables to your PATH – means adding a directory with Ruby executables to the system variable. This is recommended to do for in future to avoid specifying the full path to the script interpreter each time the Ruby script is run.

Associate .rb and .rbw files with Ruby installation. Thanks to this, Ruby files can be launched by double-clicking or by typing the name of the script on the command line.

Use UTF-8 as default external encoding.

I selected all three checkmarks and entered C:\Ruby26 as the installation folder:

As you can see on the next page, the Ruby package itself takes up a bit of space, but the MSYS2 development toolkit offered for installation takes up a lot of space. I highly recommend installing MSYS2 because, in addition to the ability to compile packages for Ruby mentioned above, MSYS2 provides a console environment with Linux features (something like Cygwin does, but with additional features).

Leave a checkmark on the last window to configure the MSYS2 developer tools and click Finish.

Further we are offered:

Just press ENTER to complete all three actions:

Everything is completed, to exit, press ENTER:

By the way, if you carefully watched what was happening on the screen, you might notice pacman. There really is a pacman package manager in this console environment. We will return to other functions of MSYS2 a bit later.

How to update Ruby on Windows

To upgrade to the latest patch (that is, the minor version, for example from 2.5.1 to 2.5.4), it is enough to launch a new version of the installer. Installed gem (packages from the Ruby repository) are not overwritten and will work with the new version without reinstalling. To upgrade the installation, just use RubyInstaller without Devkit. You can update Devkit separately by running the following command at the Windows command prompt:

When a new major version is released, it cannot be updated by installing it in the same directory as the previous one. For example, if the previous version of the installation is RubyInstaller-2.5.x, and the new version is RubyInstaller-2.6.x, then you need to install it either in a new directory or delete the old version and install a new one instead, since gem (programs) with C extensions are not compatible between ruby-2.5 and 2.6.

How to install and use gem on Windows

RubyGems is a package manager for Ruby. Using it, you can install various programs and their dependencies, installation can be done both from the source code on the local system, and from remote application sources.

Читайте также:  Pale moon linux deb

The Ruby installation shown above also installs gem:

You should see gem help.

To display all available gem commands, run:

To install the package, run a command of the form:

More examples of installing packages will follow.

To show help about the installation command:

For example, to install the ‘rake’ program from a local directory or a remote server:

Installing the ‘rake’ package only from a remote server:

Installing ‘rake’, but only version 0.3.1, even if there are unsatisfied dependencies, do the installation in the user directory:

List gem (packages) whose name begins with ‘D’:

List local and remote gem whose name contains ‘log’:

The previous command is used to search for packages by name.

List only remote (non-local) gem whose name contains ‘log’:

View information about RubyGems:

Update all gem programs in the system:

Update local version of RubyGems:

How to install bundler

bundler is a Ruby dependency manager. This manager is useful when installing other programs written in Ruby.

To install bundler on Windows, run:

To upgrade bundle, run the command:

If you install the program from the source code and there is a Gemfile file, then go to the folder with this program and run the command in it:

This command will install all the dependencies listed in the Gemfile.

To see where gem packages are installed using bundle, use the command:

How to install the Ruby program on Windows. How to run a Ruby program on Windows

The following are a few examples of installing and using Ruby programs on Windows.

Recovering sites from the Internet Archive in Windows

Let’s start with the Wayback Machine Downloader program, which completely restores sites from the web archive.

To install Wayback Machine Downloader, just do:

To check the operability of the program, run site restoration from the Internet Archive:

The program successfully completed the work:

How to Install WhatWeb on Windows

WhatWeb identifies websites. The purpose of this program is to answer the question “What is this website?”. WhatWeb recognizes web technologies, including a content management system (CMS), blogging platforms, statistics/analytics packages, JavaScript libraries, a web server and embedded devices. WhatWeb has over 1700 plugins, each of which is for recognizing one or the other. WhatWeb also identifies version numbers, email addresses, account IDs, web platform modules, SQL errors and more.

Let’s start by searching WhatWeb in the Ruby package repository:

Only simple_whatweb found (0.4.1).

Even if it’s WhatWeb, the version is very old. Therefore, on Windows, install WhatWeb from the source code.

Unzip this folder. Open a command prompt and navigate to this folder:

Run the command:

The following command will show the help for the program:

Run the site check:

How to install WPScan on Windows

To install and run WPScan on Windows is tricky a bit, so the tutorial was divided in separate article “How to Install and Run WPScan on Windows”.

What is MSYS2. How to use MSYS2

We have already installed MSYS2 in order to gain access to compilation tools, thanks to which we can install any Ruby package. In fact, MSYS2 is based on Cygwin and contains a large number of Linux utilities.

MSYS2 provides a shell for bash, Autotools, make, gcc, pacman, sh, and many other packages. Of particular note is the pacman package manager.

To activate the MSYS2 working environment, open a command prompt or powershell console and run there:

As a result, many Linux utilities will immediately become available for work, as well as the Pacman package manager, with which you can install new packages or update existing ones. When installing packages, Pacman monitors the dependencies and installs them.

To update all packages:

To search for a package:

To list all available packages:

How to configure Ruby as an Apache module on Windows

Ruby scripts can be run in an Apache environment similar to running PHP scripts. To do this, you need to make a little configuration.

I installed the web server according to this tutorial, if you installed according to another manual, then edit the paths to fit your environment.

Open the httpd.conf file for editing, I have it located on the path C:\Server\bin\Apache24\conf\httpd.conf.

Find the line there

and add ExecCGI to it. You should get the following line (ATTENTION: you may have different the set of options):

Оцените статью