Ruby 2.0.0p0 IRB warning: "DL is deprecated, please use Fiddle" Ruby 2.0.0p0 IRB warning: "DL is deprecated, please use Fiddle" windows windows

Ruby 2.0.0p0 IRB warning: "DL is deprecated, please use Fiddle"


The message you received is common when you have ruby 2.0.0p0 (2013-02-24) on top of Windows.

The message "DL is deprecated, please use Fiddle" is not an error; it's only a warning.

The source is the Deprecation notice for DL introduced some time ago in dl.rb ( see revisions/37910 ).

On Windows the lib/ruby/site_ruby/2.0.0/readline.rb file still requires dl.rb so the warning message comes out when you require 'irb' ( because irb requires 'readline' ) or when anything else wants to require 'readline'.

You can open readline.rb with your favorite text editor and look up the code ( near line 4369 ):

    if RUBY_VERSION < '1.9.1'      require 'Win32API'    else      require 'dl'      class Win32API        DLL = {}

We can always hope for an improvement to work out this deprecation in future releases of Ruby.

EDIT:For those wanting to go deeper about Fiddle vs DL, let it be said that their purpose is to dynamically link external libraries with Ruby; you can read on the ruby-doc website about DL or Fiddle.


You may want to comment out the DL is deprecated, please use Fiddle warning at

C:\Ruby200\lib\ruby\2.0.0\dl.rb

since it’s annoying and you are not the irb/pry or some other gems code owner


I got this resolution at openshift.com.

Resolution:

This error occurs only on Windows machine with Ruby 2.0.0 version. Until we officially support Ruby 2.0 please downgrade to Ruby 1.9.

On Windows, you can install Ruby 1.9.3 alongside 2.0. Change your %PATH% to c:\ruby193\ or whatever directory you installed to prior to installing the gem.