Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

How Not To Build An E-Commerce Site With Rails

By Peter Cooper / September 24, 2007

Derek Sivers, quite the Rails champion when he decided to rebuild his CD Baby e-commerce site using Rails two years ago, has now admitted defeat. After two years of wrestling with Rails while building the new site, Sivers along with coder Jeremy Kemper, decided to face up to reality. Kemper went off to 37signals and Sivers rebuilt the entire site in PHP in just two months. As such, Slashdot is jumping on the bandwagon by telling developers to "think again" about using Rails in future.

Comments

  1. crayz says:

    Looks like DHH put out his thoughts:
    http://www.loudthinking.com/posts/13-thinking-about-the-big-rewrite

    For all the controversy this has kicked up, the post had a pretty shocking lack of detail on what exactly went wrong

  2. Jeremy McAnally says:

    I'm trying to figure out what the heck he was trying to do that "didn't fit with Rails." I don't mean to be a fanboy, but I've built a wide range of stuff with Rails and I'm sort of puzzled as to what just didn't work for him.

  3. Tristan says:

    I agree with Jeremy. His site looks straight forward enough. I'd like to hear him elaborate on the problems, so if they do exist they can be addressed.

  4. Don says:

    I just hope the comments here don't degenerate like the ones to that article. Some of comments posted there aren't representing the Rails community all that well.

  5. Danno says:

    I don't even know man, I was the second commenter on that article, I asked him if his rewrite was done yet and I didn't get an answer.

    What I wouldn't give to see the commit log.

  6. David Rupp says:

    Huh. I don't remember DHH having those concerns when "The Big Rewrite" was being done by a major internet player rewriting in his framework.

    @Don: I would like to be able to agree with you (re: the comments that "aren't representing the Rails community all that well"). But I'm afraid there are at least two -- largely disjoint -- versions of the Rails community: the one that I (and I assume you) have been part of at some point or other that's focused on getting good work done for our clients, and the one that goes around loudly and profanely attacking any legitimate criticism of their newfound religion.

    It's the Dark Side of the internet, my friend, and it's not getting any lighter.

  7. Don says:

    David: I didn't word that very well. I meant that the criticism and outright attacks in the comments might reflect negatively on the Rails community, not that those folks don't represent a part of the community.

    Basically I was voicing a hope that these comments don't turn into a bunch of posts about this guy not knowing what he's doing, and then just bashing his site design. :)

  8. suhrawardi says:

    Hmm, the current CD Baby site doesn't look railsey, it's Web0.9 if you ask me. reminds me of the good old days of the internet.
    But why does the 37signals site display the php easter-egg?
    http://www.37signals.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
    is that site rebuild in php as well...?

  9. riki says:

    Rails doesn't force you to use migrations. You can jump into Command Line and write SQL is desired.

  10. Pratik says:

    Peter, do you seriously believe that a site like cdbaby.com cannot be built with any damn web framework under the sun in less than 2 years ?

    The reason why their project failed, is clearly because of their lack of planning and vision. It has nothing to do with rails or php. Using their management's failure as that of rails, is just way too lame.

  11. Pratik says:

    Haha..sorry. I just noticed the tag "Troll Of The Month"

    lol

  12. Arnon Rotem-Gal-Oz says:

    He failed because he adopted rails as a technology without thinking about the architectural/design implications of the move
    I wrote about it in my blog: http://www.rgoarchitects.com/nblog/2007/09/23/WarningTechnologyMappingHasImplications.aspx

  13. Neil Wilson says:

    This issue is entropy - the existing system is already there and to change it *always* costs vastly more than anybody realises.

    I didn't see anything unusual - just a very expensive training exercise in why it is often cheaper to pay the money for legacy maintenance of an existing structure.

  14. planetmcd says:

    I wish it was a bit more detailed. I've found Rails apt for the tasks I've thrown at it, but they 've all been greenfield applications.
    On the bit about the rails community, I do think there is something to be concerned about.
    Here's my take:

    http://planetmcd.blogspot.com/2007/09/rails-is-not-opinionated-it-is.html

  15. John says:

    Does anyone really think that he rewrote his website in 2 months (part time) from scratch? It reads to me like someone who has screwed up twice (the original PHP that needed rewriting, and his Ruby mess) and now he's finally figured out what he wants the site to do. This only got airplay since Slashdot green lighted it - read the comments there are you'll see most people know this is not a technology issue.

  16. FiZ says:

    Allow me to advocate the devil for a moment (as I'm wont to do), and say what I got from his article about the switch. The best thing he liked about switching back to PHP is 1) having knowledge gained from rails on how to rebuild the site better in a language he's more familiar with; 2) He knows every line of his application inside and out. No searching for how to extend {x} or add feature {y} because he wrote the whole thing himself.

    Honestly, I think his post is less about PHP vs. Ruby and more about taking lessons learned from Rails and applying it to a language he's more familiar with. After all, that's the beauty of development: You don't have to use something exactly the way it was packaged, you can substitute and modify any detail you'd like. Rails has taught the dev world a good lesson in keeping code clean and organized even though you don't have to actually use rails to get the benefits.

  17. NomDePlume says:

    I resent the fact that you are now branding Derek as "Troll of the Month" I think his concerns are legitimate, and the Rails community should learn something from his experience as opposed to just jumping all over him.

    This SHOULD NOT have happened! And the guy was sincere, and he put his money where his mouth was. He spent real dollars on a core team member. I've seen total morons asking for 150+ an hour just because they 'know' rails.

    I can only imagine how much bitsweat cost cdbaby.com , If Derek paid a hundred grand for bitsweat's time, he would have gotten off cheap. So every friggin fanboy, who's written a stupid blog and thinks rails is the end of the world, should calm down and try to re-read what he was trying to say. Or spend a hundred grand and then opine on someone who has.

  18. cag says:

    I've seen total morons asking for 150+ an hour just because they 'know' rails.

    So every friggin fanboy, who's written a stupid blog and thinks rails is the end of the world

    Nice - I think your wise words and name calling just calmed all of them down - mission accomplished!

  19. Flipper says:

    I have to agree that there just isn't enough information in his original post to make any sort of intelligent argument either for or against his statements. I too would be very interested in what actually went on.

    I do feel some of his pain. We are in the midst of rewriting our web app and going from php to rails. It's a bit easier for us since we are not trying to do a 1:1 conversion but instead are coming at it from a 'this is new and seems to be better, how can we improve our app' standpoint.

    However, being part of a going concern, you find that your day goes something like this: code, answer tech support call, commit because you forgot to earlier, start to code, answer ops question for sales person, code, respond to network issue, try to code, commit..... etc. So I do completely understand his line regarding where two years went.

  20. MachineHead says:

    What NomDePlume said.

    There's a lesson in here that we need to understand. CDBaby was a "first mover" and with Jeremy Kemper on board, I'm truly surprised and concerned that they failed.

  21. Senthil Nayagam says:

    I have posted on my company blog on it.

    it is clients perogative to change his mind on which technology to use or which projects to scrap.

    CDBaby was one of the initial poster child and got more attention than it probably it deserved due to being a pioneering project.

    I totally agree with Chad Fowler's article big rewrite.

  22. Jon says:

    Maybe he should have been reading more articles like http://cfis.savagexi.com/articles/2007/09/05/rails-unusual-architecture ! Just my two cents!

  23. Markús says:

    Read carefully that article, you can be misled by its title. I think that it is a shame to find an article such as this with so impact in the community.

    It is a isolated case of a man worried about "I can edit my SQL sentences so I turn back to PHP". What the hell is that? I don't want to touch SQL anymore!

    Have you watched the commercial from railsenvy.com, Rails vs PHP? Then think that PHP is the winner in that video without change anything (even dialogues). This article is exactly that.

  24. Luke says:

    Had to laugh...

    http://feeds.dzone.com/~r/dzone/ruby/~3/161999947/why_i_switched_back_from_rails_to_assembler.html

  25. John Joyce says:

    that they failed at such a (seemingly) simple site... amazing.
    But did they fail?
    What are the details?
    Did they clash?
    He did seem to say he wanted to keep his old database (rather than migrating the data...) this is usually a bad idea. Rails 101, make the database slave to your app, not the reverse.
    But software 101, establish requirements!
    Agile or not, if you start with big bold ambitions but shift them around when the little stuff is being settled on, things get harder to change around...

Other Posts to Enjoy

Twitter Mentions