It’s called String#start_with?, not String#startswith: In Ruby, the names of boolean-ish methods end with ? and the words in method names are separated with an _. On Rails you can use the alias String#starts_with? (note the plural – and note that this method is deprecated). Personally, I’d prefer String#starts_with? over the actual String#start_with?