Starting Fresh with Ruby on Rails 3
I recently wiped my MacBook Pro and did a complete, fresh install of OS X. It has been over a year since my last clean install and it was definitely overdue. I am taking Ethan Kaplan's advice and only installing apps as the need arises so I don't end up with an Applications folder so large it takes a bit to load, even on a dual SSD system.
Speaking of SSDs, I ended up undoing my SSD RAID 0 array. It was ridiculously fast and definitely a hoot to have around but I was worried I would boot my Mac one day and it just wouldn't work (especially after seeing degraded performance). I backup like a fiend, so I wasn't worried about data loss, just the pure inconvenience of it all. My first SSD died after 9 months, and I've been running this RAID array for over a year now.
I was probably worried the most since this is the longest I have been running the same Mac. In the past 5 years of my Mac ownership, they usually die around the 9-12 month mark and I'm going on 17+ months with this MacBook Pro. To clarify, most of my past Macs have had some motherboard issue or something else requiring a lengthy Apple repair that usually takes 2 weeks. Let's not forget the time my first-gen MacBook Air went in for repair and came back with a German keyboard. I would end up buying a new computer on the spot so I could continue working uninterrupted and then sell the repaired computer when it returned weeks later.
The point of this post is to express my joy in how much better this system feels. Mainly, it's because the *nix backend is completely de-cluttered from crap I have installed over the 17 months. It had gotten to the point where homebrew kept breaking and rvm was impossible to setup, despite numerous attempts.
In particular, I'm getting back into Rails for something I'm working on. My first time touching Rails was with my first startup, Skribit, back around 2008. I haven't kept up to date on all the Ruby on Rails 3 happenings in the last year and have been playing catchup this week. It's actually kind of nice that I'm in this state of remembering my Rails 2 foo while learning new Rails 3-isms. It feels great, especially coming from my daily hacking on Notifo, which is a CodeIgniter (PHP 5) with Redis setup. CodeIgniter is on the opposite end of the spectrum — very lightweight and performance oriented; you get nothing for free. No special "magic" as is often the case with Rails.
There are gobs of small (and big) changes in Rails 3 that make me happy. Routes. Scopes. Default XSS protection (goodbye "h"). Validations occurring in ActiveModel instead of ActiveRecord, making it alternative ORM friendly. Lazy loading thanks to ActiveRelation, et cetera. If you're on the Rails 3 train too, this EnvyLabs cheat sheet is nice to have handy.
If you're just starting out with Rails 3, these are also vital resources:
- Ruby on Rails 3 Tutorial book & screencast
- Learnivore - Rails 3 Screencasts
- Rails Inside
- Rails 3 Release Notes
- Rails 3 API
- Ruby on Rails Guides
I'm sure this is just the start of more Rails-related braindumps..