Some of the most successful people are highly motivated by their insecurities (eg Warren Buffett). Some have a very specific vision they want to accomplish. Some like dhh follow one goal at a time. Some simply grew up with the expectation that great things were expected of them and see their success more as a result of their habits than their goals. Some are motivated by revenge. Some are motivated by proving others wrong. Some are motivated by not wanting to be ordinary. Some are motivated by wanting to be accepted and loved. Etc.
So really, the best thing you can do is look back at your own life and figure out what drove you to action. What was the time in your life when you were most productive & effective? And what was your life like then?
I look at motivation as the hind-sight rationalization for how people got lucky. For all we know, 30 other people were trying what DHH was, but we never heard from them because they didn't get lucky.
I do think you can stack the cards in your favor (DHH is a really smart guy, that is certainly one planted card), but no amount of internal anything can guarantee success.
So I try to stack some cards: work regularly on my project, make a concerted effort to find value to add, interact with people in a positive way so I don't burn bridges, etc. Maybe it's not an "I can remake the world to be what I want" entrepreneurial attitude, but I think it is more realistic for a bootstrapped project.
If he had initially framed his racing goal as winning Le Mans, he might have said "You know what, this Rails thing is going pretty well, why don't I just stick to that."
And if he had initially framed his goals for Rails as "creating a popular new framework", he might have said "you know what, XBOX is pretty fun", and never tried.
I've no doubt that DHH has failed at some goals using this method. The important thing is that it has helped him try enough times to rack up successes as well.
All these motivators seem like emotional instabilities, is motivation really internal at all? I wonder, what if I hadn't been told my idea sucked, would I have had the same drive to make it work?