Marko Anastasov wrote this on February 8, 2011

Golf and coming-soon in real life

Check out the lander for FreeBirdee, built with our coming-soon template and designed by our friends Sprawsm.

It’s our newest client work collaboration and all we can say so far is that we’re hoping the upcoming app will appeal to the people who enjoy a good game of golf in their spare time.

Here are a few lessons we’ve learned along the way.

With postmark-gem and Ruby 1.9, send email with the mail gem

TMail’s Ruby 1.9 compatibility bugs are known and particularly exposed to users of Postmark — at least those who did not have the patched version from ActiveSupport loaded correctly.

But what to do if you’re writing a Sinatra app? Fortunately it is possible to use the mail gem. Mail is written by Mikel Lindsaar, TMail’s author, and “designed form the ground up to work with Ruby 1.9”. Here’s a snippet:

message = Mail.new do
  # set to, from, subject, body
  text_part do
    body message_body
  end
end

message.delivery_method Mail::Postmark, { :api_key => "..." }
message.deliver

The critical part is explicitly putting the body in one of the content type containers, otherwise you’d see a hard to debug exception.

FasterCSV has been merged to the standard library in Ruby 1.9

I updated coming-soon accordingly. via.

Shotgun and virtual machines

By default, you can’t reach shotgun through a network address on a virtual machine. The solution is to run it as shotgun -o 0.0.0.0 yourapp.rb. via.

comments powered by Disqus

About Marko Anastasov

Rendered Text co-founder. Started with code, currently more focused on people and words. Foosball striker and entry-level cyclist.

Suggested Reads

———

Rendered Text is a software company. For questions regarding Semaphore, please visit semaphoreci.com. Otherwise, feel free to get in touch any time by sending us an email.