Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Don't know much about ruby, but I'm pretty sure that's how they're converting the numbers to strings.
Your isPrime function fails for 3 (sqrt(3) < 2, creating an invalid range).
Also, your solution has a worst-case complexity of O(n²); there's a more clever way to do what you're doing without checking all previous primes each time.