umlify icon indicating copy to clipboard operation
umlify copied to clipboard

ruby 3 : undefined method `escape' for URI:Module

Open laurent-martin opened this issue 3 years ago • 2 comments

gems/ruby-3.0.0/gems/umlify-1.2.6/lib/umlify/runner.rb:65:in `block in download_image': undefined method `escape' for URI:Module (NoMethodError)

URI.escape was deprecated , CGI.escape should be used.

laurent-martin avatar Mar 02 '22 08:03 laurent-martin

Same issue

Downloading the image from yUML, it shouldn't be long.
/usr/local/lib/ruby/gems/3.1/gems/umlify-1.2.6/lib/umlify/runner.rb:65:in `block in download_image': undefined method `escape' for URI:Module (NoMethodError)

        http.get(URI.escape(@diagram.get_uri))
                    ^^^^^^^
	from /usr/local/lib/ruby/gems/3.1/gems/net-http-0.2.2/lib/net/http.rb:985:in `start'
	from /usr/local/lib/ruby/gems/3.1/gems/net-http-0.2.2/lib/net/http.rb:628:in `start'
	from /usr/local/lib/ruby/gems/3.1/gems/umlify-1.2.6/lib/umlify/runner.rb:64:in `download_image'
	from /usr/local/lib/ruby/gems/3.1/gems/umlify-1.2.6/lib/umlify/runner.rb:43:in `run'
	from /usr/local/lib/ruby/gems/3.1/gems/umlify-1.2.6/lib/umlify.rb:47:in `execute'
	from /usr/local/lib/ruby/gems/3.1/gems/umlify-1.2.6/bin/umlify:5:in `<top (required)>'
	from /usr/local/bin/umlify:25:in `load'
	from /usr/local/bin/umlify:25:in `<main>'

EDIT: I changed for CGI.escape but the uml.png generated is not readable

$ umlify lib/*/*
umlifying
processing lib/umlify/diagram.rb...
processing lib/umlify/extension.rb...
processing lib/umlify/parser_sexp.rb...
processing lib/umlify/runner.rb...
processing lib/umlify/uml_class.rb...
processing lib/umlify/version.rb...
Downloading the image from yUML, it shouldn't be long.
Saved in uml.png

joyboy67 avatar Jul 18 '22 11:07 joyboy67

C:\Users\a0233420\Desktop\vatf-scripts>umlify ./BSP/boot_stress/bootstress_test.rb umlifying processing ./BSP/boot_stress/bootstress_test.rb... Downloading the image from yUML, it shouldn't be long. C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/umlify-1.2.6/lib/umlify/runner.rb:65:in block in download_image': undefined method escape' for URI:Module (NoMethodError) from C:/Ruby30-x64/lib/ruby/3.0.0/net/http.rb:960:in start' from C:/Ruby30-x64/lib/ruby/3.0.0/net/http.rb:621:in start' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/umlify-1.2.6/lib/umlify/runner.rb:64:in download_image' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/umlify-1.2.6/lib/umlify/runner.rb:43:in run' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/umlify-1.2.6/lib/umlify.rb:47:in execute' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/umlify-1.2.6/bin/umlify:5:in <top (required)>' from C:/Ruby30-x64/bin/umlify:23:in load' from C:/Ruby30-x64/bin/umlify:23:in

'

Fermi-4 avatar Nov 01 '22 13:11 Fermi-4