Sit back, relax, and enjoy the code.

Quick Hits: Things to keep in mind

Posted: May 17th, 2009 | Author: abel | Filed under: Quick Hits, Rails, Uncategorized | 1 Comment »

(1) Before you unpack your gems, navigate to your vendors directory:

/Users/[yourname]/[your-app]/vendor/gems: gem unpack [gem name]

It isn’t the end of the world if you don’t do it ahead of time, but it does make life slightly easier.

(2) Remember that when you find a bug, you should write a test for the expected behavior BEFORE fixing the bug.  “The Rails Way” has a great quote about testing:

“It’s not that Rails encourages you to do test-driven development, it’s that it makes it difficult for you not to do test-driven development.” ~Brian Eng

I’ve interpreted this quote into the following mantra:

“It’s not that rails makes it easy to test, it that it makes you pay when you don’t”.

Finding a bug after creating your test suite just means that you missed a test.  Take the opportunity to correct that.

Happy hacking.

  • Share/Bookmark

One Comment on “Quick Hits: Things to keep in mind”

  1. #1 gabe said at 12:23 pm on May 23rd, 2009:

    #1 isn’t an issue if you list your required gems in environment.rb like you should, then just use rake gems:unpack to get all your required gems into vendor/gems


Leave a Reply