Jamie's Weblog

Lessons of a startup CTO — and other things

Here I am!

Jamie Lawrence

Jamie Lawrence

I help non-technical founders start their business, build their product, get their first customers, and grow their technical team. I'm a generalist software engineer and I've worked with many different languages over the past 15 years but my current tool of choice is Ruby on Rails. I'm also an enthusiastic photographer and a novice archer

Personal Links

View Full Profile →

Subscribe to future posts

No yukky spam • No more than one email a month

rails

February 24, 2014 0

Using Guard and Vagrant for Rails development

Background I do all my development in a Vagrant VM and it’s mostly a seamless experience — except when using I was using guard. guard listens to file changes and runs the matching specs — it’s invaluable when doing any test-driven development. But when guard was running inside Vagrant it wouldn’t receive the filesystem events […]

Read More
January 29, 2014 0

Implementing User Settings with Rails 3.2, Postgres and Apartment

ok, so I’ll actually be talking about Company settings, not User settings. You get the idea. I needed to start storing some per-company configuration settings in a client app. I could obviously start adding columns to the Company table but these settings will: a) change over time; b) only apply to a few companies (the […]

Read More
January 27, 2014 0

Did the backup run?

So, after a major screw-up today I discovered that the daily backup process hadn’t run for the past two weeks (ASIDE: after you update ruby, remember to reinstall all the non-bundled gems) I use the backup gem to automate the backup process (user content, postgres database, and the actual app) and it’s scheduled to run […]

Read More
November 7, 2013 0

Links from last night’s RubyCork meetup

Here’s a quick selection of links from last night’s RubyCork meetup: Schema_plus: A very nice gem that let’s you create indices within create_table migration jsRoutes incredibly useful gem which bring your Rails routes into your Javascript. Solves a big pain in modern rails apps. SelfControl for helping you to focus without distracting news sites/blogs etc. […]

Read More
August 2, 2013 0

PSA: Strip your user’s (email address)

Help preserve your sanity by strip’ing your user’s email address unless you enjoy being confused by things-that-should-work-but-don’t when confronted by a email address like ‘ jamie@ideasasylum.com’. Rails makes this exceptionally easy by overriding the default setter: “`ruby class User < ActiveRecord::Base # … def email=(email) write_attribute :email, email.strip end end describe User do it ‘should […]

Read More
June 14, 2013 0

Routine backups for your Rails Server

Problem: protecting your user’s data I recently wrote about using tarsnap to backup a linux server and that’s especially important with the recent revelations about PRISM. Tarsnap is “backups for the truly paranoid” but it’s only part of the story and perhaps isn’t the best route for all servers. With a Rails server, you can […]

Read More
June 5, 2013 0

LiveReload and HTTPS

Web developers, particularly Rails developers, are on a constant lookout for anything which makes their lives easier and their development process easier. Enter LiveReload. This little app watches for changes in a directory and reloads your web browser whenever a file is updated: Edit your CSS, save and bam! the web browser has already refreshed. […]

Read More
March 12, 2013 0

Configuring Guard notifications with Vagrant

One problem when running everything in a headless Vagrant instance is that you lose the ability to see Guard Rspec notifications. Actually, you don’t lose it but it’s not immediately obvious how to configure Guard. Since Guard is running inside Vagrant, it can’t display the Growl notifications on the guest operating system. However, you can […]

Read More
January 21, 2013 0

Picks of the week: Papertrail, rack-ssl-enforcer, WP-Markdown and Marked

I recently set up PaperTrail on our production server and it’s extremely useful. It basically uploads the log files you configure, aggregates them and let’s you search them. That’s useful but what’s blow-me-away amazing is setting up saved searches and alerts. Now I can easily be notified when a particular user logs it, or when […]

Read More
January 17, 2013 1

Securing your web application with Nginx, Rails 3 and Namecheap SSL certs

Securing your web application with an SSL certificate is the least your users will expect you to do. Once upon a time, HTTPS sites were rare and even then, only the “private” parts beyond a login dialog were encrypted. Those times died with Netscape and they aren’t coming back. Here I’ll show you how to […]

Read More
Older Posts