What to do and how to install when an error occurs in DXRuby 1.4.7

The 2D game library "DXRuby" for Ruby for Windows has been upgraded to 1.4.7, and now supports the latest Ruby 3.0.0, and finally the 64-bit version of Ruby. However, when using it on Windows 10, I got an error and was impatient, so make a note of the notes.

→ Previous article Notes on using DXRuby 1.4.6 on Windows 10 and how to install it

important point

・ DXRuby only works on Windows

Since it uses DirectX on Windows, it does not work on macOS and Linux. Other than the Windows environment, there are libraries such as "DXOpal" and "Nyle-canvas" that can be operated with almost the same code as DXRuby (however, they are not completely compatible).

"RubyInstaller for Windows" is convenient for installing Ruby. From DXRuby 1.4.7, it supports 64-bit version Ruby (version written as " x64 "). DXRuby doesn't have to be with Devkit (MSYS2).

-In the 64-bit version, an error occurs in Sound.new

→ ・ [DXRuby 1.4.7] Error in Sound.new on 64bit · Issue # 4 · mirichi/dxruby

-On Windows 10, it will not work unless d3dx9_40.dll is added.

Due to this, I installed DXRuby, but when I ran it, I got an error and was impatient.

DXRuby uses the Windows DirectX 9 library. (So ​​it doesn't work except on Windows.) From Window10, DirectX 9 is no longer included, so you need to add it yourself.

reference) → ・ On Windows 10, d3dx9_40.dll is required to run DXRuby · Issue # 3 · mirichi/dxruby

* How to install d3dx9_40.dll

It is safe to download d3dx9_40.dll from the official Microsoft site.

  1. Download DirectX End-User Runtimes (June 2010). https://www.microsoft.com/en-us/download/details.aspx?id=8109

  2. Double-click the downloaded directx_Jun2010_redist.exe. Specify an appropriate folder and unzip it.

  3. All you need is d3dx9_40.dll, so search the unzipped folder for the necessary files according to Ruby's 64bit/32bit. ・ 64bit version Ruby (x64); Nov2008_d3dx9_40_x64.cab32bit version Ruby (x86, i386); Nov2008_d3dx9_40_x86.cab

  4. Double-click Nov2008_d3dx9_40_x64.cab or Nov2008_d3dx9_40_x86.cab.

  5. Double-click d3dx9_40.dll inside, specify an appropriate folder, and unzip it.

  6. d3dx9_40.dll is created in the unzipped folder.

  7. Copy the resulting d3dx9_40.dll to your Windows folder. There are two ways to do it.

a) Copy it to the bin folder in the installed Ruby folder. C: \ Ruby30-x64 \ bin etc.

b) Copy to the Windows program folder.

-In the case of 64bit version d3dx9_40.dll; C: \ Windows \ System32 folder (this is theprogram folder for64bit)

-For 32bit version d3dx9_40.dll; C: \ Windows \ SysWOW64 folder (this is theprogram folder for32bit)

"Access to the target folder is denied Administrator privileges are required to copy to this folder. "

And the panel will appear, Continue button Press to copy.

  1. (Restart Windows if necessary.)

How to install DXRuby

You can install DXRuby 1.4.7 from RubyGems.

> gem install dxruby

Check if DXRuby works

> irb
irb(main):001:0> require 'dxruby'
=> true
irb(main):002:0> exit

If it says true, it's OK!

reference)

→ ・ Challenge Graphic Programming --Let's Start with Ruby Programming --Cocanet (Children's Science Website)

Recommended Posts

What to do and how to install when an error occurs in DXRuby 1.4.7
What to do if an error occurs when nokogiri enters when bundle install
What to do if an error occurs when doing npm install axios in React + Typescript project
What to do when an UnsupportedCharsetException occurs in a lightweight JRE
What to do when IllegalStateException occurs in PlayFramework
Add gem'rails-i18n','~> 6.0.0' and what to do if bundle install gives an error
What to do when a null byte error occurs
What to do if an ActionController :: UnknownFormat error occurs
Error ExecJS :: RuntimeUnavailable: What to do when it occurs
What to do when an error occurs in rails db: migrate ((StandardError: An error has occurred, this and all later migrations canceled :))
What to do when javax.batch.operations.JobStartException occurs
What happened in "Java 8 to Java 11" and how to build an environment
What to do if an error occurs in VS Code when importing a django module or your own module installed by pip install
What to do when a javax.el.PropertyNotWritableException occurs
[Rails] What to do when the error No database selected and Unknown database appears in db: migrate
What to do when an error (StandardError: An error has occurred, this and all later migrations canceled:) appears in rails db: migrate
no space left on device What to do if an error occurs
What to do if you get an error when you hit Heroku logs
Notes on what to do when a WebView ClassNotFoundException occurs in JavaFX 12
What to do if you get an error with bundle install by entering gem'bcrypt' in your Gemfile
wildflly10 java8 ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000906 What to do if an error occurs
Summary when trying to use Solr in Java and getting an error (Solr 6.x)
When using a list in Java, java.awt.List comes out and an error occurs
What to do if ffi installation fails when launching an application in Rails
What to do if ClassNotFoundException occurs when starting Tomcat
After installing'devise''bootstrap' of gemfile with rails, what to do when url is an error
What to do when Method not found in f: ajax
An error occurs when codedeploy-agent is installed in Ubuntu Server 20.04
How to install PHP 7.4 and SQL Server drivers in CentOS 7.7
What to do if mysql2 gets a bundle install error
How to install Bootstrap in Ruby
What to do after Vagrant install
What to do if a SAX Parser error occurs when using Liferay 7 / DXP on AWS
What to do if you get an error in Basic authentication during Rails test code
[Rails 6] What to do when a missing a template error occurs after introducing haml [Super easy]
How to install Swiper in Rails
How to install and use Composer on an ECS instance on Ubuntu 16.04
What to do if you get a gcc error in Docker
Collecting client information when an error occurs in a web application
[Webpacker] Summary of how to install Bootstrap and jQuery in Rails 6.0
What to do when the changes in the Servlet are not reflected
How to output the value when there is an array in the array
After switching between Java 8 and 11 versions, an error occurs in confirmation
[jOOQ] How to CASE WHEN in the WHERE / AND / OR clause
How to install the language used in Ubuntu and how to build the environment
What to do if you get a DISPLAY error in gym.render ()
How to solve the unknown error when using slf4j in Java
What to do if an SSH key authentication error occurs during automatic deployment to EC2 with Capistrano
What to do if you get a JNI shared library error when trying to build in Eclipse
What to do if you get an [An HTTP request took too long to complete.] Error in Docker.
How to do base conversion in Java
A reminder when an aapt.exe error occurs
What to do if you install Ubuntu
What to do when undefined method ʻuser_signed_in?'
How to display error messages in Japanese
What to do when "npm ERR! Code ENOSELF" is displayed after npm install
What to do if you get an uninitialized constant Likes Controller error
What to do when Blocked Host: "host name" appears in Ruby on Rails
How to display error messages and success messages when registering as a user
I want to display an error message when registering in the database
What to do if tomcat process remains when tomcat is stopped in eclipse