Setup a Ruby On Rails Development environment in VSCode with devcontainer
VS Code, one of the most popular editors/IDEs today, with help from the Dev Containers extension, makes the task of setting up a container for software development easier than ever.
To demonstrate that, we’re going to walk through setting up such an environment for developing Ruby on Rails applications.
A dev container employs a Docker Container as a development environment. With one you can mount Visual Studio Code (vscode) to a container for development through the configuration of a devcontainer.json file. Visual Studio Code isn't the only application for dev containers, but it is the one I'll cover here.
Development Containers: https://containers.dev Use pre-made templates: https://containers.dev/templates For Ruby On Rails and Postgresql: https://github.com/devcontainers/templates/tree/main/src/ruby-rails-postgres
See: https://code.visualstudio.com/docs/devcontainers/create-dev-container
Click on the green area in the lower left corner of VS Code or select Reopen in Container from the command palette.