AD1 Gitpod Extensions and Settings
Extensions
vortizhe.simple-ruby-erb - allows the ERB tag keyboard shortcut toggle.
jnbt.vscode-rufo - allows the "Format Document" option to work for .rb files. Requires the rufo gem. A forked version of this extension should be included in each project and installed in workspace setup.
aliariff.vscode-erb-beautify - allows the "Format Document" option to work for .erb files. Requires the htmlbeautifier gem and the files.associations VS Code setting.
.gitpod.yml should look something like:
image: XXXXXXXXXX
tasks:
- before: |
bin/setup
.vscode/manage_extensions
ports:
- port: 3000
onOpen: open-preview
- port: 9500-9999
onOpen: ignore
vscode:
extensions:
- vortizhe.simple-ruby-erb
- aliariff.vscode-erb-beautifyIf specs require JS to run, the test server will run on some port in this range. This setting prevents the "Open in a new tab" popup dialogue from appearing which previously, confused students.
Make sure the replace <RUBY_VERSION> with the current Ruby version for the project.
The before task runs first before a workspace has been fully created, and again each time before the workspace starts. This should now copy the gems that were installed in the Docker image to vendor/bundle/. Bundler is then configured to use vendor/bundle as the default gem directory, effectively pre-installing all gems. The Rails database is then setup with any seed data. This code only runs if the gems have not been copied over to the current directory.
.vscode/manage_extensions runs a script that will uninstall extensions that Gitpod installs by default (refer to this PR for more details).
Settings
.theiafolder is no longer needed as long asgrade_runnergem is up to date..vscode/settings.jsonshould look like:
Auto save is enabled by default in VS Code (unlike Theia).
Last updated