String#start_with? was introduced in Ruby 1.8.7. You are apparently using an earlier version, which (unfortunately) is not uncommon, but the 1.8 series is retiring soon, and you should consider updating.
Can't find a reference to String#start_with? at 1.8.6 docs , but it exists at 1.8.7 docs .
source share