Monday, December 19, 2011

Rake task to drop, create, migrate then seed your development database

When developing a Ruby on Rails application you will often want to drop, create, migrate then seed your development database. Justin French wrote a blog post describing how to write a custom rake task to do just that. I had to modify the code to work properly in my Rails 3 (3.1.x) development environment, so I thought I'd share.

# Rake task to drop, create, migrate then seed your development database
# with fixture data
# Based on http://justinfrench.com/index.php?id=232

namespace :db do
  desc "Raise an error unless the current Rails environment is development"
  task :development_environment_only do
    raise "Development only!" unless Rails.env.development?
  end

  desc "Drop, create, migrate then seed development database"
  task :devreset => [
    'environment', 
    'db:development_environment_only', 
    'db:drop', 
    'db:create', 
    'db:migrate', 
    'db:seed'
    ]

end

Sunday, December 18, 2011

Pressure Cooker Coconut Chicken Curry Recipe


Following is my personal recipe for coconut chicken curry, cooked in a pressure cooker. This recipe is based on other recipes from around the Internet. I can’t claim that this recipe is “authentic” in any way. Rather, it’s inspired by similar dishes from Indian restaurants around the Washington, DC area.

Prep time: 10 minutes
Cook time: 30 minutes (total)
Servings: 8 - 10

Ingredients

Onion, chopped – 1 medium
Bell pepper (red or orange for color), sliced thin lengthwise – 1 medium
Garlic, chopped – 6 cloves
Potatoes, cubed – 2 small

Curry powder – 2 Tbsp/30ml
Paprika – 2 tsp/10ml
Ginger – dried, ground – 1 tsp/5ml
Garlic salt – 2 tsp/10ml

Coconut milk – 1 can/13.5oz/400ml
Sesame oil – 2 Tbsp/30ml

Chicken thighs, thawed, with bones – 10

Preparation

1. Add sesame oil to pressure cooker and heat to medium high heat
2. Add onion, bell pepper, and garlic to oil, cook for several minutes
3. Add chicken thighs and cook on one side for several minutes
4. Add curry powder, paprika, ginger, and garlic salt
5. Turn chicken thighs and cook on other side for several more minutes
6. Add potatoes
7. Add coconut milk
8. Place lid on pressure cooker, lock, and adjust pressure setting to poultry
9. Continue cooking on medium high heat until pressure indicator pops up (about 10 minutes)
10. Lower heat to low/simmer (about 10 more minutes)

Weight Watchers PointsPlus values (per serving per the online recipe builder): 9

ShareThis