IANAL, but I used to redistribute Free Software...
In general, the answer is that (a) you own what you wrote and (b) using Ruby or Rails libraries doesn't "infect" your code in any manner. Static linking and inclusion of source code are exceptions, but neither tends to be a problem. Use of an interpreter or the supporting libraries is well-trodden ground and isn't a problem.
Open Source licences aren't supposed to restrict the way in which the code is used, only its redistribution, relicensing, etc. So, as long as your use is within (say) a company, you aren't likely to have any problem at all. Even when you are redistributing software externally, the rules aren't onerous:
* Don't claim that you wrote or own others' material.
* Don't distribute binaries that are based on GPLed code without being willing to distribute the source code, as well. This could, for example, apply to distributing the Ruby interpreter.
However, the "Library" (aka Lesser) GPL was specifically designed to handle this situation. In the unlikely event that the regular GPL was used AND the author is unwilling to accept the Lesser GPL AND redistribution is an issue, you might have a problem. But it's unlikely...
In any case, accommodating and courteous behavior will get you out of most disputes. Conversely, strict adherence to legalisms may be insufficient to avoid calumny, if you aren't perceived as being courteous and acting in good faith.
-r