Skip to content

`require': cannot load such file -- syntax_suggest (LoadError) #233

@Jaco-Pretorius

Description

@Jaco-Pretorius

I am having issues with running derailed against a Rails app with Ruby 3.2.2. The issue is rather obscure, but I'll put the stacktrace here

/Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/dead_end-1.1.6/lib/dead_end/auto.rb:30:in `require': cannot load such file -- /Users/my-user-name/src/ext/save-history.rb (LoadError)
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/dead_end-1.1.6/lib/dead_end/auto.rb:30:in `require_relative'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/3.2.0/irb/extend-command.rb:368:in `save_history='
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/3.2.0/irb/context.rb:137:in `initialize'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/3.2.0/irb.rb:473:in `new'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/3.2.0/irb.rb:473:in `initialize'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/3.2.0/irb.rb:419:in `new'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/3.2.0/irb.rb:419:in `start'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/commands/console/console_command.rb:70:in `start'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/commands/console/console_command.rb:19:in `start'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/commands/console/console_command.rb:102:in `perform'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/command/base.rb:87:in `perform'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/command.rb:48:in `invoke'
    from /Users/my-user-name/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

I suspect this is because the dead_end gem - which is the syntax_suggest repo - has been integrated with Ruby 3.2. At the very least it's not clear to me what is expected to happen if you include that gem while running Ruby 3.2 or later. There is an issue against the syntax_suggest repo which seems to indicate that you no longer need to include the gem but it doesn't say what will happen when you do. The stacktrace above does point to some of the require_relative overrides going on in that gem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions