Skip to content

Commit a308978

Browse files
Merge pull request #3219 from mcdonaldseanp/fix_acceptance
(maint) Update acceptance to fix windows ruby install
2 parents 7a10680 + c7be7f9 commit a308978

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

acceptance/setup/common/pre-suite/010_install_ruby.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@
1313
# HACK: to add chocolatey path to cygwin: this path should at least be
1414
# instrospected from the STDOUT of the installer.
1515
bolt.add_env_var('PATH', '/cygdrive/c/ProgramData/chocolatey/bin:PATH')
16-
on(bolt, powershell('choco install ruby -y --version 2.5.3.101'))
17-
on(bolt, powershell('choco list --lo ruby')) do |output|
18-
version = /ruby (2\.[0-9])/.match(output.stdout)[1].delete('.')
16+
on(bolt, powershell('choco install ruby -y'))
17+
on(bolt, powershell('choco list ruby')) do |output|
18+
version = /ruby ([2-3]\.[0-9])/.match(output.stdout)[1].delete('.')
1919
bolt.add_env_var('PATH', "/cygdrive/c/tools/ruby#{version}/bin:PATH")
2020
end
21+
# The ruby devkit (required to build gems with C extensions) has changed,
22+
# and we now need to install msys2 ourselves. https://community.chocolatey.org/packages/msys2
23+
on(bolt, powershell('choco install msys2 -y --params "/NoUpdate"'))
24+
on(bolt, powershell('ridk install 2 3'))
25+
# Add the msys bins to PATH
26+
bolt.add_env_var('PATH', "/cygdrive/c/tools/msys64:PATH")
2127
# public_suffix for win requires Ruby version >= 2.6
2228
# current Ruby 2.5.0 works with public_suffix version 4.0.7
2329
on(bolt, powershell('gem install public_suffix -v 4.0.7'))

0 commit comments

Comments
 (0)