One of the reasons I made the switch to Ruby on Rails is that I want to be in charge of my own code and only implement the code that I need in my projects. I just finished a tutorial on Tuts+ called Building a Store With a Payment Gateway in Rails
I liked it because it explains exactly how a core e-commerce solution works. It’s less complex than one would think. Basically all you need is a product, an order, order-item and user object.
The code for this project can be found here