title: How to fix (RubyInstaller::Runtime::DllDirectory::WinApiError) in ruby on windows?
body: <p>while Implementing ruby2d in the code i get this error </p>
  
  <p>It's a strange runtime issue </p>
  
  <h2><strong>Ruby2d Code</strong></h2>
  
  <pre><code>require 'ruby2d'
  # Set the window size
  set width: 300, height: 200
  # Create a new shape
  s = Square.new
  # Give it some color
  s.color = 'red'
  # Show the window
   show
  </code></pre>
  
  <h2>Error</h2>
  
  <pre><code>  8: from R.rb:1:in `&lt;main&gt;'
      7: from C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
      6: from C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
      5: from C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
      4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/ruby2d-0.5.1/lib/ruby2d.rb:28:in `&lt;top (required)&gt;'
      3: from C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0/ruby_installer/runtime/singleton.rb:12:in `add_dll_directory'
      2: from C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0/ruby_installer/runtime/singleton.rb:12:in `new'
      1: from C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0/ruby_installer/runtime/dll_directory.rb:50:in `initialize'
  
  
  *C:/Ruby25- 
  x64/lib/ruby/site_ruby/2.5.0/ruby_installer/runtime/dll_directory.rb:83:in 
  `add_dll_directory_winapi': AddDllDirectory failed for 
  C:/Users/Salim/usr/local/bin 
  (RubyInstaller::Runtime::DllDirectory::WinApiError)*
  </code></pre>
  
  <p><strong>Please Help me to fix</strong></p>