Skip to content

Commit

Permalink
Install Debian's rustc package instead of the devcontainer rust feature
Browse files Browse the repository at this point in the history
Just installing rustc is a lighter weight way of installing Rust without compiling, and does not introduce the rust-related vscode extensions installed by the feature which are unecessary for most ruby development. This gives us rust version 1.63, which is acceptable for now. If we need a specific version in the future we may need to compile rust ourselves.
  • Loading branch information
andrewn617 committed May 29, 2024
1 parent e4bb145 commit 3d1b0cf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-ruby-feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
cacheFrom: ghcr.io/rails/devcontainer/test-ruby-feature
subFolder: .github
refFilterForPush: refs/heads/main
runCmd: ruby -v || ( echo "Ruby is not installed."; exit 1 )
runCmd: RUBY_YJIT_ENABLE=1 ruby -v | grep +YJIT || ( echo "Ruby is not installed."; exit 1 )
7 changes: 2 additions & 5 deletions features/ruby/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "ruby",
"version": "1.0.0",
"version": "1.1.0",
"name": "Ruby (via rbenv)",
"description": "Installs Ruby, rbenv, ruby-build and libraries needed to build Ruby",
"customizations": {
Expand All @@ -16,13 +16,10 @@
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
],
"dependsOn": {
"ghcr.io/devcontainers/features/rust": {}
},
"options": {
"version": {
"type": "string",
"default": "3.3.0",
"default": "3.3.1",
"description": "The ruby version to be installed"
}
}
Expand Down
2 changes: 1 addition & 1 deletion features/ruby/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"

apt-get update -y
apt-get -y install --no-install-recommends libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential \
libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libxml2-dev
libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libxml2-dev rustc

git clone https://github.com/rbenv/rbenv.git /usr/local/share/rbenv
git clone https://github.com/rbenv/ruby-build.git /usr/local/share/ruby-build
Expand Down
3 changes: 0 additions & 3 deletions images/ruby/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
"ghcr.io/rails/devcontainer/features/ruby": {
"version": "${localEnv:RUBY_VERSION}"
},
"ghcr.io/devcontainers/features/rust:1": {
"version": "1.77"
}
},
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
Expand Down

0 comments on commit 3d1b0cf

Please sign in to comment.