Rapid Deployment with Ruby on Rails

The Tealeaf Academy Rapid Deployment with Ruby on Rails course has been very interesting. It was a lot of information to take in.

By far, the hardest part for me was learning how to debug errors. Aside from using TDD, your three best friends when debugging are Rails console, Pry and truly understanding MVC and how it applies to the Ruby on Rails framework.request_response_mvc

I tend to learn coding practices best through repetition. However, whenever I got stuck on a syntax issues, the best resource I could find was Yuichi Hagio’s comprehensive blog. Yuichi has taken very detailed notes on both syntax and theory. Thank you Yuichi.

Creating a Github Blog Using Octopress Octopress

A typical exercise in infrustration

There are many online guides to setting up an Octopress blog using Github pages. Here are some key differences in my setup. Hopefully this will help you find a solution faster and avoid some of the frustration I went through.

Some helpful tutorials

The following sites where my main source of information. Although there are many others, these are the ones I used after limiting my Google search to results posted in the past year.

Initial Setup

Paul Sturgess’s tutorial was the closest match to the exact procedure I used. Thank you Paul.

Create a new Github repo named yourgithubusername.github.io

The name is important here as Github Pages will automatically serve up the content at http://yourgithubusername.github.io

Grab Octopress and change directory:

Note: When you clone Octopress, it will create a directory named yourgithubusername.github.io

$ git clone git://github.com/imathis/octopress.git yourgithubusername.github.io
$ cd yourgithubusername.github.io
$ gem install bundler
$ bundle install

Install the default theme:

Note: I received an error if I ran rake install If someone can explain why I would appreciate it. I searched and found the solution: bundle exec all rake commands

$ bundle exec rake install

Octopress has a configuration rake task that automatically sets the repo up for easy deployment to Github Pages: Note: This will ask you for your Github Pages repository url. When prompted in the next command, make sure you enter: git@github https://github.com/username/username.github.io.git If you omit the suffix ‘git’ the following commands will not work with your repository and Octopress will only render locally with Pow

$ bundle exec rake setup_github_pages

This task does quite a few things. The most important is that it creates a new _deploy directory that is another git repository. This is where Octopress generates the flat website for deployment to the master branch of your repo on Github.

All the Octopress code used to generate the website into the _deploy directory now lives in new branch called source. Note in the source branch the .gitignore includes _deploy so it doesn’t get committed in two places!

This sounds more complicated than it is, Octopress has rake tasks to make this really easy to manage. It’s worth pushing up at this point to check everything works before tinkering:

$ bundle exec rake generate
$ bundle exec rake deploy

This copies the generated files into _deploy, adds them to git, commits and pushes them up to the master branch.

Visit http://yourgithubusername.github.io

Note: the first time(s) I tried this it didn’t work. WTF. I deleted my repository and recreated the repository. Still did not work. The error page said that Github would send me an email in about 10min. 20min. 30min. I still haven’t received an email.

At this point only the website has been committed, the source needs to be comitted separately via:

$ git add .
$ git commit -m ‘Initial Octopress source commit’
$ git push origin source
$ bundle exec rake deploy

Running Octopress locally

Octopress works really well with POW server. Note: This was a clue. Octopress rendered locally but not remotely through Github.

$ bundle exec rake preview

Load up http://localhost:4000

Create a new posting

$ rake new_post[“Creating a Github Blog Using Octopress”]

Go to the app folder source/_posts to find the new posting Edit the posting and then follow these steps

$ rake generate
$ git add .
$ git commit -m “Initial blog post.”
$ git push origin source
$ rake deploy

Iron Legs 50 Miler – Thank You

On Saturday I completed my first ultramarathon, the Iron Legs 50 Miler. It was tough, mostly mentally but also physically.

Iron Legs 50 Miler

A heartfelt thank you to the following people:

  • All volunteers who helped at the aid stations
  • Bruce who inspired me to enter the race one year earlier
  • Mike and Colin for answering my newbie running questions
  • Leslie for making me laugh while everyone else was so serious
  • Heather a stranger who kept me in the race by stopping to give me salt pills
  • Mark for sharing Vince’s blog post (I chanted “Pain is the gift” over and over during 3hrs of cramping)
  • Iron Mommas: Alison, Christa and Kim (“Just think, only 30km and you’re done!”)
  • Chris for always being stoked
  • Christian and the Ambler crew
  • Jodi and the lulu crew
  • Eamonn and Steve for the heckling
  • Semple for laughing heartily every time voiced my enthusiasm for running
  • Laura for the tasty snacks
  • Andrew and Olivia for waiting at the finish
  • Everyone who voiced kind words when the race was over
  • Mom and Dad for babysitting Natalia.
  • Kate for telling me (halfway through) I couldn’t come home until I finished the 4 corners of Canmore, tending to me after running her own race and for understanding my need to play in the hills.

New Deadlift PR

“If you always put limits on everything you do, physical or anything else, it will spread into your work and into your life. There are no limits. There are only plateaus and you must not stay there, you must go beyond them.”
-Bruce Lee

While at CrossFit Lethbridge for a Functional Movement Screening seminar I worked out with Cory Gillespie. Cory is strong and a great coach. After not attempting a 1RM deadlift for over a year, I surprised myself by lifting #40 more than the year previous. Thanks for the inspiration Cory!

Are you looking for people who CrossFit in Canmore?

The CrossFit community in Canmore is growing steadily. If you are interested in getting started with like-minded people or if you are experienced with CrossFit and need a place to train, email me and I can point you in the right direction.

If you want to get started on your own, here are a couple of resources you will find helpful:

Foundations (explains CrossFit)

A CrossFit Startup Guide

Don’t be intimidated!  CrossFit is for everyone.
If you have any questions, feel free to get in touch with me.

Power Clean, Back Squat & Weighted Chin Ups


A. Power Clean @ 10X0; 1,1,1,1,1; rest 240 sec
B1. Back Squat @ 30X0; 2-3 x 4; rest 180 sec
B2. Chin Ups @ 20X0; 2,2,1,1; rest 180 sec

My Results:

A. 185, 195, 205, 215, 225f
B1. 3@225, 3@255, 2@275, 2@275
B2. 2@40, 2@50, 1@70, 1@70

Felt weak today. Took last weak off b/c I was feeling run down from work and everyone around me seemed to be sick. Did two workouts on the weekend interspersed with copious relaxing.

Double unders, thrusters and kettlebell swings


part 1:
for time;
50 double unders
5 thrusters – 95#
40 double unders
10 thrusters – 95#
30 double unders
15 thrusters – 95#
20 double unders
20 thrusters – 95#
10 double unders
25 thrusters – 95#

rest 6 hours

part 2:
for time;
150 KBS – 2pd

My Results

Part 1

Part 2

Oh wretched double unders, how I love and despise thee! Double unders are great because I find them so challenging, yet they are sooooo incredibly frustrating. Good times!

Clean & Jerk, Row, and Sumo Deadlift High Pull


part 1:
Clean and Jerk – 5RM
(no more than 3 sec reset on ground b/t reps)

rest 3 hours

part 2:
Row 2K
30 SDLHP – 115#
Row 1K
20 SDLHP – 115#
Row 500 m
10 SDLHP – 115#

My Results

Part 1

rest 5min

Part 2
2K: 7:20
1K: 3:42
500 M: 1:48
Total time: 20:01

I had to suppress the rest due to various obligations today. I found this workout super fun. The SDLHP felt heavy but the rowing felt smooth.