This post exists as a note to myself so I can remember the pain. So far:

7:30am - My old copy of Agile Web Development with Rails may be more of a hindrance than a help. It's from the days of yore (Rails 1.2 or so) and I'd like to work with the current 2.0 version of Rails, but this means some of the book's command-line instructions have to be ignored and the "modern" equivalent found online. Turns out database tables get created in a "user-friendly" migration instead of the older convention of raw sql files. I'll need to find the way to add indicies and other db tuning info to the migrations. It's all irrelevant if I can't figure out why my model doesn't show any fields when I try to create it in the admin. I either fouled something up using the old conventions or there's some miscommunication between Rails and MySQL (it groused about not having the mysql gem installed a while back, but I installed it-- of course, that barfed when trying to install its documentation, but it said it installed correctly and I don't see the log warnings anymore). I feel like Aptana is more of a hindrance than a help right now as I'm drowning in options and ways to investigate what's going on.

7:45am - Going back and reading the link above in a more linear fashion, it does clearly say "no dynamic scaffolding", which may be my problem, that I'm trying to rebuild the scaffolding over what I initially generated. All I see when I go to the scaffold page is a create button with no fields. Pressing the create button adds a record to the database, so it's not a db communication problem (whatever it is, it's the same problem described by James here with no solution provided). I just went back, deleted all my databases and all the files/folders I could find related to the one model I've been trying to create (User). And that . . . did not work. Awesome. I can see why people love this so. It really is like magic.

7:50am - Ok, so I'm a little dim. Apparently "no dynamic scaffolding" doesn't mean "There's a new way to do this". It means "Gone". Either I'm really stupid or the tutorial linked above dances over some bits that need doing. Moving on to this tutorial since it seems to address this problem. If nothing else, I learned that I could do the Model & Controller destruction via script instead of deleting the relevant files by hand. Really helpful when starting on a framework or language, which is usually a set of fits and starts. That worked, but it took two tries. The first time I did it without specifying the fields at the command line, e.g., "ruby script/generate scaffold User", then added my fields to the migration and ran the db:migrate task. Nothing doing. So I destroyed the model & controller, re-ran the generate with all my fields listed in the line and then restarted the server without bothering to run db:migrate (the new 001_create_users.rb matched the older one exactly). It would appear the key difference is that the second run offered to overwrite the user views. Not sure if they weren't there the first time around or if I did something different. Either way, it works. And I got about 3% of where I wanted to get in the first 2 hours.

8:10am - A discussion that explains things a little more clearly. It makes sense that the scaffolds are just a starting point, but the one thing that puts me off Rails every time I start up again is the attitude of the community. It's endemic. I tried to get help in IRC once and anyone with a question is treated like an ass for not being part of the club. I do this for a living, I just don't do it in your language and framework of choice. The community feels so closed-minded, but closed in a really interesting way, because I'm either getting too old or there's a stink to the Rails Borg that makes it an Insiders Club no one but misanthropes would actually want to be accepted into. I have a Powerbook and a copy of Textmate. Neither of them changed my life. If they were gone tomorrow, I could cope. My simplistic observation of how to "belong":

  1. Mac laptop
  2. Textmate
  3. Glasses
  4. Short haircut

Actually, I have all of that. Still not interested. I should point out your development machine needs to be a laptop so you can develop on the road at all the places no one is ever going to ask you to go. From that discussion: "dynamic scaffolding was a crutch that kept people from really getting Rails from the start". See? It's not about being able to get whatever you want done. It's about learning Ruby and Rails and falling deeply in love with them. Bad enough when developers lose sight of what an application is supposed to do for people and start gold-plating features because the app becomes an end goal in itself. This guy wants you to move another step of abstraction past that: you need to spend some time learning the framework upfront. He's not so much turning the value proposition of Rails upside-down as he's throwing it out. I'm guessing he has full-time employment with no real deadlines.