I had the same problem; I think there is a typo in the instructions.
Try putting a line break between r = super and (r ==
Gem::Requirement.default) ? nil : r. It should look like a snippet I
found here (which ultimately helped me figure this out.)
http://www.redmine.org/issues/7516
I'm still not done working through the instructions, but this change
did appear to allow the gems::install command to work as intended.
Good luck
Philip