Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Yuan Tang
14,168 PointsDL is deprecated
when I type irb in the command, it says "DL is deprecated, please use Fiddle". I have had this problem for many times and tried the solutions online but still unable to fix it. Any suggestions would be appreciated.
1 Answer
Stone Preston
42,016 Pointsthat is a common warning when using windows. see this stack overflow post for more info.
from the top answer:
The message you received is common on 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 still require dl.rb so the warning message come out when you require 'irb' ( because irb require 'readline' ) or anything else wants to require 'readline'
You can open with your favorite editor the readline.rb and look up the code ( nearby 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 be said that their purpose is to dynamically link external libraries with Ruby; you can read ruby-doc about DL or Fiddle.