Learn how to set up your environment and install dependencies
Ruby 2D works with 64-bit Windows and is tested on the latest releases of Windows 10, but will probably work with previous versions as well. While there are several ways to get Ruby on Windows, Ruby 2D requires a MinGW environment. We recommend using the latest RubyInstaller for Windows, which is based on MSYS2 (the Ruby 2.3 and older installers are no longer supported). You can download and run the installer, or use Chocolatey to get Ruby and MSYS2 — instructions for both are below. If you already have Ruby installed, skip ahead to the next section.
Install the Ruby package using
choco install ruby
Install the MSYS2 package using
choco install msys2
$ echo 'export PATH=$PATH:/c/tools/ruby25/bin' >> ~/.bash_profile
C:\tools\msys64\mingw64.exe) and running:
$ pacman -S make mingw-w64-x86_64-gcc
At this time, you might want to create a convenient shortcut to the
Open a MinGW 64-bit command prompt, if you haven’t already. This will be at
Copy, paste, and run the following snippet in the command prompt to download and install the latest Simple 2D MinGW release:
url='https://raw.githubusercontent.com/simple2d/simple2d/master/bin/simple2d.sh'; which curl > /dev/null && cmd='curl -fsSL' || cmd='wget -qO -'; bash <($cmd $url) install
You’re now ready to install the gem! Make sure to use a MinGW 64-bit command prompt as you did when installing Simple 2D above.
$ gem install ruby2d
That’s it! Head back to the “get started” guide and write your first 2D app »