Skip to content

Commit 4fce622

Browse files
committed
Recommend installing Ruby 2.3 on OSX
Move references to some specific ruby versions into a helper method so it's easier to keep track of them
1 parent 9a6adee commit 4fce622

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

lib/site_extensions/installfest.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module StepExtensions
2+
module Installfest
3+
def version_string(name)
4+
case name
5+
when :minimum_ruby
6+
'2.2.2'
7+
when :osx_ruby_short
8+
'2.3'
9+
when :windows_ruby_short
10+
'2.2'
11+
else
12+
raise StandardError, "No version string exists for '#{name}'"
13+
end
14+
end
15+
end
16+
end
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
console <<-BASH
2-
rvm install 2.2.2
2+
rvm install #{version_string(:osx_ruby_short)}
33
BASH
44

55
message "This downloads and compiles Ruby, which takes a while."
66
console <<-BASH
7-
rvm use 2.2.2
8-
rvm --default use 2.2.2
7+
rvm use #{version_string(:osx_ruby_short)}
8+
rvm --default use #{version_string(:osx_ruby_short)}
99
BASH
1010

1111
verify do
1212
console "ruby -v"
13-
fuzzy_result "ruby 2.2.2{FUZZY}p0 (2014-12-25 revision 49005) [x86_64-darwin13]{/FUZZY}"
13+
fuzzy_result "ruby #{version_string(:osx_ruby_short)}{FUZZY}.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]{/FUZZY}"
1414
end
1515

1616
div do
1717
h1 "Troubleshooting"
18-
important "If `rvm install 2.2.2` says `autoreconf was not found in the PATH`" do
18+
important "If `rvm install #{version_string(:osx_ruby_short)}` says `autoreconf was not found in the PATH`" do
1919
div do
2020
option_half "Mac OS" do
2121
console "brew install automake"
@@ -26,7 +26,7 @@ div do
2626
end
2727
end
2828

29-
message "Once that completes, retry `rvm install 2.2.2`"
29+
message "Once that completes, retry `rvm install #{version_string(:osx_ruby_short)}`"
3030
end
3131
end
3232

sites/en/installfest/get_a_sticker.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ step "Have a volunteer check your tool versions" do
1414
h3 "On all operating systems:"
1515

1616
console "ruby -v"
17-
fuzzy_result "ruby 2.2.{FUZZY}4p230 (2015-12-16 revision 53155) [x86_64-darwin13]{/FUZZY}"
17+
fuzzy_result "ruby 2.2{FUZZY}.4p230 (2015-12-16 revision 53155) [x86_64-darwin13]{/FUZZY}"
1818

19-
tip "Depending on your environment, your Ruby version might be **2.2** or **2.3**. As long as it's 2.2.2 or above, you're good to go."
19+
tip "Depending on your environment, your Ruby version might be **2.2** or **2.3**. As long as it's #{version_string(:minimum_ruby)} or above, you're good to go."
2020

2121
console "bundle -v"
2222
fuzzy_result "Bundler version 1{FUZZY}.x.x{/FUZZY}"

sites/en/installfest/windows.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MARKDOWN
66

77
step "Run RailsInstaller" do
88
message "RailsInstaller includes Rails, Ruby, Git and SQLite."
9-
message "Go to <http://railsinstaller.org/>, scroll to the 'Downloads' section, and download the RailsInstaller for Windows/Ruby 2.2."
9+
message "Go to <http://railsinstaller.org/>, scroll to the 'Downloads' section, and download the RailsInstaller for Windows/Ruby #{version_string(:windows_ruby_short)}."
1010
message "Click on the downloaded file to run the install wizard. Click Next at each step to accept the defaults."
1111
message "Be sure to check the boxes for *Install git (recommended)* and *Add executables for Ruby, DevKit Git (if checked above) to the PATH*"
1212

@@ -108,7 +108,7 @@ end
108108
step "Sanity Check" do
109109

110110
console "ruby -v"
111-
fuzzy_result "ruby 2.2{FUZZY}.4{/FUZZY}"
111+
fuzzy_result "ruby #{version_string(:windows_ruby_short)}{FUZZY}.4{/FUZZY}"
112112

113113
console "rails -v"
114114
fuzzy_result "Rails 5.0{FUZZY}.x{/FUZZY}"

0 commit comments

Comments
 (0)