VSCode migration from RubyMine - HELP
We have a large Ruby on Rails started at ROR version 4 (recently upgraded to ROR 7, with Ruby 3.2.1).
-> Now the issue is till date we were using the JetBrains RubyMine with docker-compose setup, RubyMine - docker-compose setup, everything was working fine with rubocop, debugger. gem files navigation, and RubyMines intellisense.
-> Now we are planning to stop the RubyMine subscription and started the migration to VScode.
I'm trying to containerize the setup using VSCodes devcontainer feature with the existing docker-compose.yml file configured exsting. I have successfully setted up the ruby-lsp (from shopify). But when I try to setup Sorbet, I have following confusions and issues,
- I only wanted the Sorbet's LSP for my project (type checking is not required) - main
- For sorbet I need the Sorbet's gem to be installed, but I don't want the existing application's Gemfile to be polluted. Therefore I have created another Gemfile under the .devcontainer folder and added required gems.
- Is solargraph is any way better than sorbet.
- What is the best way to achieve this requirement?
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Smart-Homes - VS Code",
"dockerComposeFile": "../../docker-compose.yml",
"service": "smart-homes-web_v1",
// "postCreateCommand": "cd /src && BUNDLE_GEMFILE=/src/.devcontainer/Gemfile.dev bundle install --gemfile=/src/.devcontainer/Gemfile.dev",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git:1": {
"version": "latest"
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"Shopify.ruby-extensions-pack",
"Shopify.ruby-lsp",
"sorbet.sorbet-vscode-extension",
"KoichiSasada.vscode-rdbg"
]
}
},
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
"workspaceFolder": "/src"
}
This is my devcontainer config, and also each time I want to bundle the gems even though the docker-compose does that.
Please help out.