There are lots of frameworks for game development, but the problem is exactly in what you've described: rails. You can only get so far within the constraints of those frameworks before you need something it just can't do, and have to develop yourself. Depending on the framework, this may not even be possible (which is what leads to creation of new frameworks).
With that said, a lot of great (albeit typically somewhat simple) games are made with frameworks. When I when to a few game jams back in college, we typically started with something so that we could have a "complete" game by the end.
Also, using an existing engine often means giving up the possibility of having unique features or capabilities. Having the only game with multidimensional quad-resolution bumpmap tensors (in realtime!) can be a major selling point. Of course, in most cases, you'll get a better overall game by focusing on the art, story, gameplay, etc., but that doesn't always translate to sales.
With that said, a lot of great (albeit typically somewhat simple) games are made with frameworks. When I when to a few game jams back in college, we typically started with something so that we could have a "complete" game by the end.