Category "Coding"
November 03, 2007
Rails: Click!
So I'm geeking out with Ruby on Rails lately. It's a dream come true. Working on my ongoing PHP projects just about breaks my heart, and I almost want to go to clients and convince them to start projects over because really, I'll probably have them done faster that way anyway.
And then last night I was staring at my project-mainly-for-the-sake-of-getting-my-hands-dirty-in RoR, that I'd been smashing my fists on the keyboard with for about a week... and suddenly it clicked. I got it. Suddenly I saw how some of the pieces fit together... and I (just as a tentative am-I-really-seeing-what-I-think-I'm-seeing test you understand) started a new rails app and in just a few minutes had that new test app up to almost exactly the same point as the one I'd been struggling so hard with!
So here they are, then 10-12 (depending on how you look at it) steps of how I basically plan to start every forseeable rails app I work on in the near future. Two assumptions here, (1) I pretty much always want to use database sessions as opposed to flat file sessions, and (2) almost every single web app on the face of the interwebs requires a login and password. So, mostly general concise instructions for those with some rails knowledge; commands in the terminal are preceded by [term]:
- [term] rails my_app
- create database
- add password to database.yml
- uncomment db sessions in environment.rb
- [term] rake db:sessions:create
- [term] script/plugin source HTTP://svn.techno-weenie.net/projects/plugins
- [term] script/plugin install acts_as_authenticated
- [term] script/generate authenticated user account
- generate models
- edit table creation migrations
- [term] rake db:migrate
- generate scaffolds
Posted by crock038 at 12:07 PM | Comments (0) | TrackBack | Coding