Ruby3.1, Ruby on Rails 7.0 の開発環境用の devcontainer
- language server: solargraph
- debugging: debug
- formatter: rubocop
- type checking: rbs, rbs_rails, steep
※ devcontainer に必要なツールのインストールはこちら
- VSCodeを開き、
Reopen in Container
を実行する
devcontainer上でTerminalを開き、コマンドを実行する
$ bin/rails s
# gem collection の install
$ bundle exec rbs collection install
# rbs_rails
$ bin/rake rbs_rails:all
# Steep check
$ bundle exec steep check
# Generate documentation for bundled gems
$ bundle exec solargraph bundle
# Download Ruby core documentation
$ bundle exec solargraph download-core
devcontainer上で、 デバッグを実行
を実行する(ショートカットキー: F5)
デバッグを実行
を利用するとVSCode Debuggingが利用可能
- rebornix.Ruby
- castwide.solargraph
- KoichiSasada.vscode-rdbg
- soutaro.steep-vscode
- soutaro.rbs-syntax
- redhat.vscode-yaml
- VisualStudioExptTeam.vscodeintellicode
- esbenp.prettier-vscode
- EditorConfig.EditorConfig
docker compose で構成
- app: ruby:3.1-bullseye
- postgres: postgres:14