Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tried to create Proc object without a block #32

Open
rcabrerizo opened this issue Apr 25, 2022 · 10 comments
Open

tried to create Proc object without a block #32

rcabrerizo opened this issue Apr 25, 2022 · 10 comments

Comments

@rcabrerizo
Copy link

C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in new': tried to create Proc object without a block (ArgumentError) from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in memoized'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:234:in <class:ProxyOptions>' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:216:in module:Faraday'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:1:in <top (required)>' from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in require' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:80:in block in require_libs'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:79:in each' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:79:in require_libs'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:240:in <module:Faraday>' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:16:in <top (required)>'
from internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence.rb:6:in <top (required)>' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/options.rb:2:in require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/options.rb:2:in <top (required)>' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/invoker.rb:4:in require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/invoker.rb:4:in <top (required)>' from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in require' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/bin/asciidoctor-confluence:4:in <top (required)>'
from C:/Ruby31-x64/bin/asciidoctor-confluence:32:in load' from C:/Ruby31-x64/bin/asciidoctor-confluence:32:in

@cmuench
Copy link

cmuench commented Aug 3, 2022

I have the same problem on my Arch Linux.
Installation via gem install asciidoctor-confluence.

Ruby version info: ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux]

@ParHandler
Copy link

I have the same problem on my Alpine Linux 3.16.3.
Installation via gem install asciidoctor-confluence.

Ruby version info: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-musl]

@edupo
Copy link

edupo commented Dec 10, 2022

Same here.

@00Asgaroth00
Copy link

I have the same issue too:

/usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in `new': tried to create Proc object without a block (ArgumentError)
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in `memoized'
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:234:in `<class:ProxyOptions>'
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:216:in `<module:Faraday>'
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:1:in `<top (required)>'
        from <internal:/usr/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/usr/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:80:in `block in require_libs'
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:79:in `each'
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:79:in `require_libs'
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:240:in `<module:Faraday>'
        from /usr/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:16:in `<top (required)>'
        from <internal:/usr/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/usr/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence.rb:6:in `<top (required)>'
        from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/options.rb:2:in `require_relative'
        from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/options.rb:2:in `<top (required)>'
        from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/invoker.rb:4:in `require_relative'
        from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/invoker.rb:4:in `<top (required)>'
        from <internal:/usr/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/usr/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/bin/asciidoctor-confluence:4:in `<top (required)>'
        from /usr/bin/asciidoctor-confluence:25:in `load'
        from /usr/bin/asciidoctor-confluence:25:in `<main>'

snowe2010 added a commit to snowe2010/asciidoctor-confluence that referenced this issue Apr 28, 2023
@challengemkr20
Copy link

challengemkr20 commented May 8, 2023

snowe2010, thank you for updating the version of faraday. I'd like to see if my organization can use this before trying Antora.
I'm including my build steps in case anyone else wants to try this.

I'm running Windows 10, I installed Ruby 3.2.2.

  1. I cloned your repo and bug/32 branch:
    git clone -b bug/32 https://github.com/snowe2010/asciidoctor-confluence
  2. I built the gem:
    gem build asciidoctor-confluence.gemspec
  3. I tried to install this gem, it seems that if I don't use the correct local/force syntax, that gem will try to install from the online gem repo.
    gem install -l c:\asciidoctor-confluence\asciidoctor-confluence-0.0.2.gem
  4. My work-around was to increment the asciidoctor-confluence\lib\asciidoctor\confluence\version.rb from
    VERSION = "0.0.2" to something else, like 0.0.3 or 0.0.4. This seems to ignore the online version and build locally.

My organization also uses self-signed certificates. I'm not sure if simple username/password authentication is enabled or if my organization requires OAUTH.

When I ran it, I received this error:
An error occurred, the page has not been updated because: SSL_connect returned=1 errno=0 peeraddr=w.x.y.z:443 state=error: certificate verify failed (self-signed certificate in certificate chain)

I tried integrating to handle self-signed certificates #25, but received this error:

undefined method `basic_auth' for #<Faraday::Connection:0x000001b666836a58 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.7.4"}, @params={}, @options=#<Faraday::RequestOptions (empty)>, @ssl=#<Faraday::SSLOptions verify=true>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000001b66755e118 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded]>, @url_prefix=#<URI::HTTP http:/>, @proxy=nil>```

I'm not sure if Faraday has been updated in the ~2 years since that PR was made.

@iDoka
Copy link

iDoka commented Jun 19, 2023

I have the same issue on Ubuntu 18.04:

/home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in `new': tried to create Proc object without a block (ArgumentError)
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in `memoized'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:234:in `<class:ProxyOptions>'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:216:in `<module:Faraday>'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:1:in `<top (required)>'
	from <internal:/home/doka/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/home/doka/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:80:in `block in require_libs'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:79:in `each'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:79:in `require_libs'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:240:in `<module:Faraday>'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faraday-0.9.2/lib/faraday.rb:16:in `<top (required)>'
	from <internal:/home/doka/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/home/doka/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence.rb:6:in `<top (required)>'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/options.rb:2:in `require_relative'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/options.rb:2:in `<top (required)>'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/invoker.rb:4:in `require_relative'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/lib/asciidoctor/confluence/invoker.rb:4:in `<top (required)>'
	from <internal:/home/doka/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/home/doka/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /home/doka/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/asciidoctor-confluence-0.0.2/bin/asciidoctor-confluence:4:in `<top (required)>'
	from /home/doka/.rbenv/versions/3.1.2/bin/asciidoctor-confluence:25:in `load'
	from /home/doka/.rbenv/versions/3.1.2/bin/asciidoctor-confluence:25:in `<main>'

Tools versions:

$ ruby -v
ruby 3.1.2p20

Successfully installed json-1.8.6
Successfully installed multipart-post-2.3.0
Successfully installed faraday-0.9.2
Successfully installed asciidoctor-1.5.8
Successfully installed asciidoctor-confluence-0.0.2

@opensource21
Copy link

Same problem with docker run --rm asciidoctor/docker-asciidoctor:1.60 asciidoctor-confluence -v

@dunyakirkali
Copy link

I have the same issue with the uwebarthel/asciidoctor:latest image

@dunyakirkali
Copy link

Also tested on

ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
asciidoctor-confluence-0.0.2

and the same error

/Users/dunya/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in `new': tried to create Proc object without a block (ArgumentError)

@dunyakirkali
Copy link

It works with ruby 2.7.7

So it feels like an issue with Ruby 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants