vscode-ruby-debug icon indicating copy to clipboard operation
vscode-ruby-debug copied to clipboard

[TypeError] no implicit conversion of nil into String

Open kevinfiol opened this issue 3 years ago • 0 comments

VSCode Version: 1.71.0 OS: Linux Mint 20.3 (Ubuntu-based) Ruby 3.0.1 Rails 7.0.3.1

I am using chruby, by the way.

Steps I took to run into this error

  1. Install vscode-ruby-debug
  2. Add gem 'readapt' to my Gemfile
  3. Configure launch.json with config seen below
  4. Set breakpoint in my application controller
  5. Hit the "Play" button
  6. Debugging immediately errors out with the stacktrace below
[TypeError] no implicit conversion of nil into String
/home/kevin/.gem/ruby/3.0.1/gems/bundler-2.3.17/lib/bundler/runtime.rb:60:in `require'
/home/kevin/.gem/ruby/3.0.1/gems/bundler-2.3.17/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
/home/kevin/.gem/ruby/3.0.1/gems/bundler-2.3.17/lib/bundler/runtime.rb:55:in `each'
/home/kevin/.gem/ruby/3.0.1/gems/bundler-2.3.17/lib/bundler/runtime.rb:55:in `block in require'
/home/kevin/.gem/ruby/3.0.1/gems/bundler-2.3.17/lib/bundler/runtime.rb:44:in `each'
/home/kevin/.gem/ruby/3.0.1/gems/bundler-2.3.17/lib/bundler/runtime.rb:44:in `require'
/home/kevin/.gem/ruby/3.0.1/gems/bundler-2.3.17/lib/bundler.rb:187:in `require'
/home/kevin/me/dev/cms/en/apps/pc/config/application.rb:21:in `<top (required)>'
/home/kevin/.gem/ruby/3.0.1/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:137:in `require'
/home/kevin/.gem/ruby/3.0.1/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:137:in `block in perform'
<internal:kernel>:90:in `tap'
/home/kevin/.gem/ruby/3.0.1/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:134:in `perform'
/home/kevin/.gem/ruby/3.0.1/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
/home/kevin/.gem/ruby/3.0.1/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
/home/kevin/.gem/ruby/3.0.1/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
/home/kevin/.gem/ruby/3.0.1/gems/railties-7.0.3.1/lib/rails/command/base.rb:87:in `perform'
/home/kevin/.gem/ruby/3.0.1/gems/railties-7.0.3.1/lib/rails/command.rb:48:in `invoke'
/home/kevin/.gem/ruby/3.0.1/gems/railties-7.0.3.1/lib/rails/commands.rb:18:in `<top (required)>'
/home/kevin/me/dev/cms/en/apps/pc/bin/rails:5:in `require'
/home/kevin/me/dev/cms/en/apps/pc/bin/rails:5:in `<top (required)>'
/home/kevin/.gem/ruby/3.0.1/gems/readapt-1.4.4/lib/readapt/debugger.rb:66:in `load'
/home/kevin/.gem/ruby/3.0.1/gems/readapt-1.4.4/lib/readapt/debugger.rb:66:in `block (2 levels) in start'
/home/kevin/.gem/ruby/3.0.1/gems/readapt-1.4.4/lib/readapt/debugger.rb:80:in `run'
/home/kevin/.gem/ruby/3.0.1/gems/readapt-1.4.4/lib/readapt/debugger.rb:66:in `block in start'

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "ruby-debug",
            "request": "launch",
            "name": "Rails",
            "program": "${workspaceFolder}/bin/rails",
            "programArgs": ["server"],
            "useBundler": true
        }
    ]
}

kevinfiol avatar Sep 14 '22 14:09 kevinfiol