How to remove the DL is deprecated, please use Fiddle warning message after installing Ruby on rails
How to remove the DL is deprecated, please use Fiddle warning message after installing Ruby on rails
This article describes how to remove the DL is deprecated, please use Fiddle warning message after installing Ruby on rails. Share it with everyone for your reference, the details are as follows:
question:
After setting up the ruby on rails environment, I found that every time I run the command, there is always a Warning: DL is deprecated, please use Fiddle, for example:
It has no impact on running or anything, it’s just that Dl is out of date, but Ruby doesn’t care about this problem, but it’s annoying to look at it~~
Solution ( from stackflow ):
Find dl.rb in the installation directory D:\RailsInstaller\Ruby2.1.0\lib\ruby\2.1.0 and comment out the warn line in it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | require ``'dl.so' begin ``require ``'fiddle' unless Object``.const_defined?(:Fiddle) rescue LoadError end #warn "DL is deprecated, please use Fiddle" module DL ``# Returns true if DL is using Fiddle, the libffi wrapper. ``def self``.fiddle? ``Object``.const_defined?(:Fiddle) ``end end |
---|
Finally our world is much cleaner again!
I hope this article will be helpful to everyone in Ruby on rails programming.