Ruby 2.0.0P0 Irb Warning: "Dl Is Deprecated, Please Use Fiddle"

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.

DL is deprecated, please use Fiddle

There was a broken version of RubyInstaller that was distributed for about 5 hours.

There were only about 800 downloads of it before someone caught it, but it appears that you are running one of those downloads.

Sorry about that.

Check out the mailing list announcement for more details.

The fix is to re-install using the fixed distribution.

how to solve DL is deprecated, please use Fiddle Rails 4.1.8?

Since Ruby 2.0.0 deprecated DL to move towards fiddle movement, your best answer can be found here to get rid of the warning message that I also encountered a while ago. Good luck!

Can I hide the warning message DL is deprecated, please use Fiddle in Ruby?

Edit <Ruby_Install_Dir>\lib\ruby\<VERSION>\Win32API.rb, delete the warn line in the file.

For my installation, the file locates in C:\Ruby23-x64\lib\ruby\2.3.0\Win32API.rb and the warning line is like

warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead" if $VERBOSE

Redmine BitNami 'DL is deprecated, please use Fiddle'

I was using ruby two versions, 1.9 and later install 2.0. I was assuming I am using 2.0 but when I check I was using 1.9 so 2.0 solve my problem.
Thanks you all

Rack::File is deprecated, please use Rack::Files instead - new Ruby on Rails project

I resolved this issue by updating the gem rack:

bundle update rack   

DEPRECATION WARNING: Calling `` to an ActiveModel::Errors message array in order to add an error is deprecated. in ruby

I suspect it should be:

record.errors.add(:program_id, message: "No #{record.program_name} found on user")

https://api.rubyonrails.org/v6.1.3/classes/ActiveModel/Errors.html#method-i-add



Related Topics



Leave a reply



Submit