I assume you forgot to put the call to mySort at the end of function definition, since without it, the comparisons only go through the array once. And without that call inside, there's no nil:NilClass error. For me, the appearance of the error doesn't depend on weather the first element is 'b' or 'v', although that changes which iteration the program fails on.
This isn't a bubble sort at all, it's a selection sort.
And here's the culprit:
x += y
should be:
x = y
If you have the first version, x can get get bigger than the array and therefore out of bound. Trying to get an element out of bounds of an array results in a nil. So your code tried to execute (for example):
'a' < nil
And that's exactly what the error hinted at: objects of class NilClass (the class of nil, surprisingly) don't have the '<' method. nil doesn't have a comparison implemented, because there's no good result that can be returned. If your code was structured differently, the interpreter would tell you that the "comparison of String with nil failed", which tells us the same thing in other words.