aboutsummaryrefslogtreecommitdiff
path: root/test/formatters/installers/prettier-ruby.bash
diff options
context:
space:
mode:
Diffstat (limited to 'test/formatters/installers/prettier-ruby.bash')
-rw-r--r--test/formatters/installers/prettier-ruby.bash17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/formatters/installers/prettier-ruby.bash b/test/formatters/installers/prettier-ruby.bash
index 611f5c6..9351a44 100644
--- a/test/formatters/installers/prettier-ruby.bash
+++ b/test/formatters/installers/prettier-ruby.bash
@@ -1,15 +1,16 @@
# Need ruby for gem, need gcc and ruby headers for native gem deps
apt-get install -y ruby ruby-dev gcc
-# Install the plugin
-npm install -g prettier @prettier/plugin-ruby
-
-# Have to install from source because release not tagged yet
-# https://github.com/ruby-syntax-tree/syntax_tree-rbs/pull/34
-# https://stackoverflow.com/a/11767563
-gem install specific_install
-gem specific_install -l https://github.com/ruby-syntax-tree/syntax_tree-rbs.git
+# Apparently rubygems does not know how to do dependency resolution.
+# So we have to manually install an old version of this dependency to
+# avoid the latest version getting installed and then failing to build
+# because it does not support ruby 2.7 which is what we have.
+gem install rbs -v 3.1.3
# These are required dependencies documented at
# https://www.npmjs.com/package/@prettier/plugin-ruby
gem install prettier_print syntax_tree syntax_tree-haml syntax_tree-rbs
+
+# Install the plugin
+cd /tmp
+npm install --save-dev prettier @prettier/plugin-ruby