RSS

The Reverend

This is my new sandbox... I might pee here, too.
Aug 22
Permalink

I heart Passenger

Alright, I know I’m definitely late to the party here, but I’ve been busy with work so that’s my excuse for just now giving Passenger/mod_rails a shot.

And let me tell you: I LOVE THIS STUFF! I have the smallest slice money can buy on Slicehost (256 MB) and as of last night, I have not one, but two small sites running on one slice. Both on Passenger, and both are lightning fast. I didn’t do any real benchmark testing, but I can tell just by clicking around on the sites, they’re probably twice as fast now that they’re on one Slice running on Passenger as they were on two SEPARATE slices on Mongrel/Nginx.

Don’t get me wrong… Mongrel/Nginx definitely saved all of our asses back when it came out. I’ll never forget how happy I was to get away from Lighttpd, but this… well, this is awesome!

Anyway… if you haven’t given Passenger a shot yet then I’d say it’s definitely time. It’ll work on a shared host (meaning you won’t have to cringe at the thought of telling a client they’ll be shelling out $40-$50 a month for a VPS) and it along with Capistrano, your deployment time goes way down.

Couldn’t be happier… Honestly. Start using it now. Find out how here: http://peepcode.com/products/phusion-passenger

Jun 26
Permalink
Jun 06
Permalink
Amazon.com is down. At this point the site’s been down for well over an hour and maybe even longer. Someone will never work in this town again…
Amazon.com is down. At this point the site’s been down for well over an hour and maybe even longer. Someone will never work in this town again…
Jun 03
Permalink

Rails, Routes, REST and a resource with a singular name.

So Brad, Mark, and I are sitting at work watching the new Rails Routes Peepcode and someone asked “What happens if you do ‘map.resources :page’ vs. ‘map.resources :pages’”. Be default, we thought Rails would crap out when you did that because page_path would expect an :id, and how would you get the collection (eg. pages_path wouldn’t exist).

After putting map.resources :page into routes.rb and running rake routes, we quickly learned that this has been accounted for with object_index_path… See below:

Rails 2.1 Routes

And further proven in console:

Rails 2.1 Routes

I’m not really sure when this change was implemented, or if it was maybe there all along, but that’s an interesting little tidbit. If you ever need a resource to be name singularly, you’re fine, just use page_index_path for the collection, and then page_path(:id) for the member.

Not bad, Rails Team.

P.S. Brad is the one that caught this in the output from rake routes. Good eye, man!

Jun 02
Permalink

Rails 2.1 Action Caching

Ok, as a little disclaimer, I haven’t used a *ton* of action caching, so this may be old news to everyone out there, but just in case there’s someone out there wondering about where the cached fragments go, here’s what I dug out of the Rails source earlier today:

Configuration examples (MemoryStore is the default): 

ActionController::Base.cache_store = :memory_store 

ActionController::Base.cache_store = :file_store, "/path/to/cache/directory" 

ActionController::Base.cache_store = :drb_store, "druby://localhost:9192" 

ActionController::Base.cache_store = :mem_cache_store, "localhost" 

ActionController::Base.cache_store = MyOwnStore.new("parameter") 

I found that little helpful bit of info here: http://dev.rubyonrails.org/changeset/8393

Permalink
Rails 2.1 is here (as of last Saturday @ RailsConf).
Rails 2.1 is here (as of last Saturday @ RailsConf).
May 12
Permalink

Rails 2.1 Release Candidate is out

For those of you who follow DHH on Twitter it will come as no surprise that the Rails 2.1 Release Candidate is out.

For those of you who don’t… the Rails 2.1 Release Candidate is out.

Get it by running this command:

sudo gem install rails --source http://gems.rubyonrails.com/

Check to see if it worked by running: 

rails -v

And you should see:

Rails 2.0.991
Apr 25
Permalink

Migrate your SVN repository to GIT

So I got bit by the git bug. Hmm… nice sentence. Anyway… last night I was at the OC Ruby Group and Rob Olson made an excellent presentation on git. And seeing as how Rails, Merb, RSpec and numerous other projects that affect me have moved to GitHub, I figured I may as well learn it. So, my first step was to migrate a personal project I’ve been working on from Subversion over to Git. Thanks to google, and Jon Maddox it couldn’t have been easier.

Go see for yourself: http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/.

Apr 10
Permalink
i feel like this.
i feel like this.
Apr 05
Permalink
The coolest man in the world.
The coolest man in the world.