F3RD3F
F3RD3F

Reputation: 2509

How can I set up a ruby on rails app to be debug in VSCode with rvm

I currently have a ruby on rails app succesfully running and being debug with Rubymine.

It´s using rvm with its own gemset (ruby 2.3.1 set as default)

When I try to set this up with VSCode I cannot get it to run, receiving the following message:

<home>/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0x73d0d4 bundler-1.13.1> (NoMethodError)
    from <home>/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'

My config in VSCode is as follows:

{
            "name": "Rails server",
            "type": "Ruby",
            "request": "launch",
            "cwd": "${workspaceRoot}",
            "program": "${workspaceRoot}/bin/rails",
            "args": [
                "server",
                "-b 0.0.0.0",
                "-p 3000",
                "-e development"
            ]
        }

Any hint?

Upvotes: 2

Views: 1914

Answers (1)

F3RD3F
F3RD3F

Reputation: 2509

I finally found it!

It seems that bundler version 1.13 is causing this to happen. Installing the previous version does the trick.

gem uninstall bundler -v1.13

gem install -v 1.12

Upvotes: 1

Related Questions