Skip to content

Commit 3358d5c

Browse files
squashme! more codespaces cleanup
1 parent 845a146 commit 3358d5c

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Installs Ruby 3.2.2. When human-essentials moves to a newer version of ruby,
1+
# Installs Ruby 3.4. When human-essentials moves to a newer version of ruby,
22
# it will be more efficient to change the image.
33
# See https://github.com/devcontainers/images/blob/main/src/ruby/history/
44
#
55
# See devcontainers/features#1431 for why we include the `-bookworm`
66
# suffix. Once that issue is resolved, we can remove the suffix, which
77
# will let us follow the debian upgrade to trixie.
8-
FROM mcr.microsoft.com/devcontainers/ruby:dev-3.2-bookworm
8+
FROM mcr.microsoft.com/devcontainers/ruby:dev-3.4-bookworm
99
RUN export DEBIAN_FRONTEND=noninteractive
1010
RUN apt-get update && apt-get -y install vim curl gpg postgresql postgresql-contrib
1111
RUN cd /tmp

.devcontainer/devcontainer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
},
88
"forwardPorts": [5432, 6080],
99
"portsAttributes": {
10-
"3000": {
11-
"label": "Application",
12-
"onAutoForward": "silent"
13-
},
1410
"5432": {
1511
"label": "Database",
1612
"onAutoForward": "silent"
@@ -26,6 +22,8 @@
2622
"vscode": {
2723
"extensions": ["Shopify.ruby-extensions-pack"],
2824
"settings": {
25+
// This doesn't seem to work. Not sure if we actually
26+
// install+configure rvm.
2927
"rubyLsp.rubyVersionManager": {
3028
"identifier": "rvm"
3129
}

.devcontainer/post-create.sh

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,26 @@
1-
RUBY_VERSION="$(cat .ruby-version | tr -d '\n')"
2-
31
# copy the file only if it doesn't already exist
42
echo "*** Creating initial .env and vscode settings, if needed"
53
cp -n .devcontainer/.env.codespaces .env
64
mkdir -p .vscode && cp -n .devcontainer/launch.json.codespaces .vscode/launch.json
75

8-
# If the project's required ruby version changes from 3.2.2, this command
9-
# will download and compile the correct version, but it will take a long time.
10-
# TODO: Why do we install this RVM shim when we use rbenv later on???
11-
# if [ "$RUBY_VERSION" != "3.2.2" ]; then
12-
# echo "*** Installing Ruby $RUBY_VERSION (this may take a while)"
13-
# rvm install $RUBY_VERSION
14-
# rvm use $RUBY_VERSION
15-
# echo "Ruby $RUBY_VERSION installed"
16-
# fi
17-
186
echo "*** Setting up node"
19-
nvm install node
7+
nvm install node &
208

219
echo "*** Setting up ruby environment"
22-
rbenv init bash
23-
rbenv init fish
24-
rbenv init zsh
10+
rbenv init bash &
11+
rbenv init fish &
12+
rbenv init zsh &
2513

2614
# echo "*** Forcing platform version of nokogiri"
2715
# gem install nokogiri -v 1.18.1 --platform=ruby -- --use-system-libraries
2816

17+
# If the project's required ruby version (specified in .ruby-version)
18+
# changes from 3.4.3, this command will download and compile the correct
19+
# version, but it will take a long time.
2920
echo "*** Installing rbenv-able Ruby ***"
30-
rbenv install --skip-existing
21+
rbenv install --skip-existing &
22+
23+
wait
3124

3225
echo "*** Running project bin/setup"
3326
bin/setup

0 commit comments

Comments
 (0)