I'm on MacOS Sierra and use rbenv.
Here is my configuration for my Rails server configuration:
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"useBundler": true,
"program": "${workspaceRoot}/bin/rails",
"args": [
"server"
]
}
I've tried the following values for the "args" key:
"args": [
"server",
"-p 4002"
]
But I would get the following error:
Exiting
bundler: failed to load command: rdebug-ide (/Users/knockycode/vendor/bundle/bin/rdebug-ide)
Uncaught exception: cannot load such file -- rack/handler/-p 4002
I figured out that -p 4002
contains TWO arguments: the -p
flag, and 4002
flag value; it's not one whole argument.
The working configuration:
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"useBundler": true,
"program": "${workspaceRoot}/bin/rails",
"args": [
"server",
"-p",
"4002"
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With