Sorbet: Initialize sorbet in rails project causes an error

Created on 31 Jan 2020  路  3Comments  路  Source: sorbet/sorbet

Describe the bug:
This problem is related to using Sobert in a Ruby on Rails 6 project!
I opened an issue in the Sorbet-Rails repo, but perhaps this repo is more appropriated.
The first step of the Sorbet-Rails Initial Setup requires to run the basic Sorbet initialization. But following it doesn't conclude well.

Steps to reproduce:

  1. run:rails new app

  2. add to the Gemfile:

gem 'sorbet', :group => :development
gem 'sorbet-runtime'
  1. run: bundle install

  2. Do the Verify installation
    ~ No problems until here.

  3. run: srb init
    This step gives an error:

/usr/lib/ruby/gems/2.7.0/gems/sorbet-0.5.5316/lib/hidden-definition-finder.rb:149:in `write_constants': /tmp/d20200131-18296-1s6k0uv/reflection.rbi had unexpected errors.

More data:
Full output
reflection.json.err

Expected behavior:
The last step should complete and initialize the folder sorbet/, but it stops with an error.

Versions:

  • Ruby: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
  • Rails: Rails 6.0.2.1
  • Sorbet: Sorbet typechecker 0.5.5316 git 84b84770d0646e3e313f83d2785e547c41e6cefd-dirty built on 2020-01-31 06:27:04 GMT debug_symbols=true

I'm not using rvm, I'm using Ruby from Arch Linux repo.

bug

All 3 comments

Thanks for the bug report!

We haven't tested with ruby-2.7, is it possible for you to run with ruby-2.6 instead?

@elliottt With ruby-2.6 the process ends fine. It seems this is an issue with ruby-2.7!

Glad to hear that it's working, it sounds like we will have some work to do once we start work on 2.7 support!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julius-stripe picture julius-stripe  路  3Comments

viraptor picture viraptor  路  4Comments

smt116 picture smt116  路  4Comments

elliottt picture elliottt  路  5Comments

deecewan picture deecewan  路  4Comments