Think of the notes as a pattern in this order: E, F#, G#, A -- B, C#, D#, E. Divide the scale in half (the first four notes, then the second four, including the octave). Notice that you start with E, go up the scale with two sharps, then up to a regular A. That's the first half. Then go to a regular B, go up the scale with two more sharps (C and D), and finally arrive at the octave E. So you have a regular note, two sharps and regular note. Then a regular note, two sharps and another regular note.
Start with the open E string, then go to 2 on the E string, then 4 on the E string, then the open A string. That's the first half of the pattern. Then go to 2 on the A string, then 4 on the A string, then 1 on the D string, and finally 2 on the D string.
Beginning with that octave note (2 on the D string), the second half of the scale goes like this: 2 on the D string, 4 on the D string, 1 on the G string, 2 on the G string, 4 on the G string, 2 on the B string, 4 on the B string and finally 0 on the high e string.
Rehearse on the octave (12th fret) using the 12 on the E string as a replacement for the open E string on the low end of the guitar. The notes should go 12 on the E string, 14 on the E string, 11 on the A string, 12 on the A string, 14 on the A string, 11 on the D string, 13 on the D string and then 14 on the D string. This is the normal shape for the major scale. Move this around to anywhere on the guitar, and you'll be playing the major scale for that key.