Error init tapioca with ruby 3.4

Open
#2,156 13 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
ruby
Domain
tooling

Research direction

Start with bundle exec tapioca init on the reported Ruby 3.4.1 and Ubuntu 22.04 setup, then read tapioca/commands/annotations.rb around fetch_http_file and fetch_index. Trace the certificate failure while retrieving the central repository index; done means initialization completes without the reported OpenSSL::SSL::SSLError.

Written by the indexing model from the issue text.

Description

help-wanted

Hi I'm having this error initializing Tapioca with command:

bundle exec tapioca init

Error:

➜ bundle exec tapioca init
   identical  sorbet/config
   identical  sorbet/tapioca/config.yml
   identical  sorbet/tapioca/require.rb
       force  bin/tapioca
Retrieving index from central repository... bundler: failed to load command: tapioca (/home/ricsdeol/.asdf/installs/ruby/3.4.1/bin/tapioca)
/home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:46:in 'OpenSSL::SSL::SSLSocket#connect_nonblock': SSL_connect returned=1 errno=0 peeraddr=[2606:50c0:8000::154]:443 state=error: certificate verify failed (unable to get local issuer certificate) (OpenSSL::SSL::SSLError)
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:46:in 'Net::Protocol#ssl_socket_connect'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:1736:in 'Net::HTTP#connect'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:1636:in 'Net::HTTP#do_start'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:1625:in 'Net::HTTP#start'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:1064:in 'Net::HTTP.start'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/annotations.rb:180:in 'Tapioca::Commands::Annotations#fetch_http_file'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'UnboundMethod#bind_call'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'block in Tapioca::Commands::Annotations#_on_method_added'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/annotations.rb:158:in 'Tapioca::Commands::Annotations#fetch_file'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'UnboundMethod#bind_call'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'block in Tapioca::Commands::Annotations#_on_method_added'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/annotations.rb:104:in 'Tapioca::Commands::Annotations#fetch_index'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'UnboundMethod#bind_call'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'block in Tapioca::Commands::Annotations#_on_method_added'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/annotations.rb:87:in 'block in Tapioca::Commands::Annotations#fetch_indexes'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/annotations.rb:86:in 'Array#each'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/annotations.rb:86:in 'Tapioca::Commands::Annotations#fetch_indexes'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'UnboundMethod#bind_call'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'block in Tapioca::Commands::Annotations#_on_method_added'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/annotations.rb:40:in 'Tapioca::Commands::Annotations#execute'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'UnboundMethod#bind_call'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'block in Tapioca::Commands::Annotations#_on_method_added'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/command.rb:27:in 'block in Tapioca::Commands::Command#run'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca.rb:24:in 'block in Tapioca.silence_warnings'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/rubygems/user_interaction.rb:46:in 'Gem::DefaultUserInteraction.use_ui'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca.rb:23:in 'Tapioca.silence_warnings'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/commands/command.rb:26:in 'Tapioca::Commands::Command#run'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/cli.rb:371:in 'Tapioca::Cli#annotations'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/command.rb:28:in 'Thor::Command#run'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor.rb:538:in 'Thor.dispatch'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/invocation.rb:116:in 'Thor::Invocation#invoke'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/cli.rb:31:in 'block in Tapioca::Cli#init'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/runtime/trackers.rb:26:in 'Tapioca::Runtime::Trackers.with_trackers_enabled'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'UnboundMethod#bind_call'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/sorbet-runtime-0.5.11765/lib/types/private/methods/_methods.rb:279:in 'block in Tapioca::Runtime::Trackers._on_method_added'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/lib/tapioca/cli.rb:29:in 'Tapioca::Cli#init'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/command.rb:28:in 'Thor::Command#run'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor.rb:538:in 'Thor.dispatch'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/base.rb:584:in 'Thor::Base::ClassMethods#start'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/tapioca-0.16.8/exe/tapioca:30:in '<top (required)>'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/bin/tapioca:25:in 'Kernel#load'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/bin/tapioca:25:in '<top (required)>'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/cli/exec.rb:59:in 'Kernel.load'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/cli/exec.rb:59:in 'Bundler::CLI::Exec#kernel_load'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/cli.rb:452:in 'Bundler::CLI#exec'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/vendor/thor/lib/thor/command.rb:28:in 'Bundler::Thor::Command#run'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/vendor/thor/lib/thor.rb:538:in 'Bundler::Thor.dispatch'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/cli.rb:35:in 'Bundler::CLI.dispatch'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/vendor/thor/lib/thor/base.rb:584:in 'Bundler::Thor::Base::ClassMethods#start'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/cli.rb:29:in 'Bundler::CLI.start'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/bundler-2.6.3/exe/bundle:28:in 'block in <top (required)>'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/site_ruby/3.4.0/bundler/friendly_errors.rb:117:in 'Bundler.with_friendly_errors'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/bundler-2.6.3/exe/bundle:20:in '<top (required)>'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/bin/bundle:25:in 'Kernel#load'
        from /home/ricsdeol/.asdf/installs/ruby/3.4.1/bin/bundle:25:in '<main>'

Ruby version: 3.4.1p0

Tapioca version: tapioca (0.16.8)

I'm using Ubuntu 22.04, is there a library I should install to make it work?

Thank in advance for the help

Dominant language
Ruby
Stars
873
Forks
164
Avg merge
4d 27m
Merged PRs (30d)
9

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/tapioca

All issues in Shopify/tapioca

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.