Scott Watermasysk

Still Learning to Code

Deploying Octopress to Heroku With a Custom Buildpack

Why is this important? It means no more committing the public directory into git.

Even with just 200 or so posts, my git history felt like it was exploding every time I wrote a new post.

I went ahead and nuked my old blog repo and recommitted this cleaner (and leaner) version if you need a starting place.

Jason’s steps were great, but I did run into two snags:

  1. I could not set the buildpack directly when creating the app. I had to add the heroku config var for it instead.
  2. I got an error about a missing daemon gem. Heroku’s cedar stack is still in beta and running a RC version of bundler (as of today). I haven’t dug any further, but nuking my gem vendor folder and starting over seemed to do the trick.

Octopress Linked List

I have been meaning to implement this on my own for a while.

I did make one minor adjustment David’s example. Instead of inlining the glyph, I am adding it via CSS:

a.external-link:after {
  content: " \27A6";

Async Emails With Sorcery

For KickoffLabs, we rolled our own authentication. This worked really well, but doing it (even if we packaged it up) for future projects is less than appealing.

I have used/tried Devise, Clearance, and AuthLogic but none of them seemed to fit.

Enter Sorcery. Sorcery is a relatively new player in the rails authentication arms race.

Heroku SSL via DNSimple

If you google for Heroku SSL you will find a surprisingly long list of blog posts usually with many steps.

However, it is actually much easier than what most of them list, especially if you are using DNSimple (note: affiliate link).

Here is how to setup a Hostname Based certificate on Heroku:

Static Files Using Sinatra::Base on Heroku

I deployed a small Sinatra app last night to Heroku for the new KickoffLabs API.

Most of the Sinatra apps I have deployed in the past have been small prototypes and used the inline Sinatra app style.

However, in this case, I made the decision early on to use the Sinatra::Base class style since we plan on growing the API codebase (ie, we are going to keep it around for a long time).

Multiple Smtp Servers With Action Mailer

We recently started using PostMark on KickoffLabs. So far the service has been excellent. Unfortunately, not all of our emails fit their terms of service. I looked around for how configure an addition SMTP server via Action Mailer (and Mail gem). Surprisingly, this is not supported.