This is a cool little bash utility I wrote a couple years back to install isolated Ruby environments compiled from source, create a generated RPM spec file from that environment to build turned into an RPM.