38
loading...
This website collects cookies to deliver better user experience
group :development, :test do
gem "ruby-debug-ide", require: false
gem "debase", require: false
gem 'solargraph', require: false
end
$ bundle install
.ruby-version
file in root of project if it not already exists.$ echo "3.0.2" > .ruby-version
$ bundle binstubs bundler ruby-debug-ide solargraph
$ bundle binstubs rspec-core
bin
folder you will see 4 new files: rdebug-ide
, gdb_wrapper
, bundle
, rspec
, which will be used in VS Code configuration files..vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Start rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rails",
"useBundler": true,
"pathToBundler": "${workspaceRoot}/bin/bundle",
"showDebuggerOutput": true,
"pathToRDebugIDE": "/${workspaceRoot}/bin/rdebug-ide",
"args": ["s"]
},
{
"name": "Run tests",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rspec",
"useBundler": true,
"pathToBundler": "${workspaceRoot}/bin/bundle",
"showDebuggerOutput": true,
"pathToRDebugIDE": "/${workspaceRoot}/bin/rdebug-ide",
"args": []
}
]
}
settings.json
{
"solargraph.commandPath": "bin/solargraph",
"solargraph.formatting": true,
"editor.formatOnSave": true,
"solargraph.diagnostics": true,
}