UI themes in Chrome Dev tools

Chrome now allows you to use UI themes in their dev tools! Yay. To add a theme, find it in the Chrome extensions store. My favorite is the Flatland theme Available on github here To enable Add a theme. Go to your about:flags in chrome, chrome://flags/#enable-devtools-experiments Check the enable devtools experiments Restart Chrome Go to...

Installing Ruby 2.1.1 on Ubuntu 14.04 x86_64

UPDATE: As pointed out in the comments, readline was still not actually installing. As of this update, you can install Ruby 2.1.2 instead of 2.1.1 without the need to configure readline. I was trying to install ruby on the newly released Ubuntu 14.04 and I was running into some issues with readline. The error looked...

gitignore everything inside a directory

There are many cases where it’s important to ignore all of the files inside a directory.  Generally, files such as uploads, logs, and caches should not be stored in your git repository. Lets say you want to ignore all of the files in your /logs directory. You can ignore the entire directory by adding this...

Setting up nginx/passenger and logrotate on Ubuntu

We recently set up a fresh AWS Ubuntu instance running Ruby on Rails on Nginx and Passenger, and I wanted to make sure the nginx log files were included in the server’s lograte.  To do this, I needed to do the following. With a default nginx configuration, you can configure the log directory to point...

Using Capistrano to deploy Drupal (or other non-Rails) projects – step 1

Step 1: install RVM, Ruby 1.9.2 and Capistrano (or skip to step 2) These instructions will leave you with a single-user RVM installation. This works for me because I’m only deploying with one user. If you want more than one user to have access to RVM-installed Rubies on your server, you’ll need go the Multi-User...

How to create a sitemap

I used to think sitemaps were a waste of time. I thought it was a deliverable only UX people could love, with all those abstractions and boxes and arrow. So, I focused my attention on showing clients navigation schemes, wireframes, anything that got us closer to talking about the actual interface. I was wrong! Creating...

Testing Rails 3 with Guard and Zeus

Zeus is a really great tool for speeding up development in Rails 3. It “preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.” Guard responds to changes in your files, making it easy to automate tests. guard-zeus-client tells Guard to use Zeus...

An error occurred while installing libv8 – Mavericks

I upgraded to OS X Mavericks, and I’ve been seeing this error while bundling older Rails projects: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. ... Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Unable to find a compiler officially supported by v8. It is recommended to use GCC v4.4 or higher Using compiler: g++ ... An error occurred...

Precompiling assets with Capistrano 3.0.1

For some reason Capistrano 3.0.1 runs rake assets:precompile instead of bundle exec rake assets:precompile. This may cause issues if you have multiple versions of gems installed on your server. I was running into this error. rake aborted! You have already activated rake 0.9.6, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this....

uninitialized constant Capistrano::Configuration::SSHKit

I recently upgraded a rails project to use the latest and greatest version of capistrano (3.0.0) and was faced with this rather unusual error when running any rake command. After a lot of trouble shooting and digging into the new capistrano gem’s source, I realized the error was actually thrown by including the capistrano_colors gem...

Git Subtrees

I’ve been working on a Spree project recently and decided to open source a couple of the extensions about half way through development. After doing a little reading here, here and here I decided a better fit would be to use a subtree. I broke the extensions off into their own repos, forked them to...

SXSW

The Blenderbox team was fortunate enough to go to SXSWedu this month in Austin, Texas, where we presented our work on NYC College Line, New York City’s new website for helping students get into and stay in college. To learn more about the project, you can check out our presentation online. While we were there, we...

RVM aliases

Problem: I recently upgraded RVM, and now every time I cd into a directory with a .rvmrc file that has ruby_string="ruby-1.9.3", I get this warning: ruby-1.9.3-p392 is not installed. To install do: 'rvm install ruby-1.9.3-p392' Unfortunately, I’m too busy to install the newer patch level Ruby right now. Solution: Create a RVM alias that points...

View SCSS in Chrome Dev Tools with Source Maps

@paul_irish recently tweeted about this ( I can’t find the tweet right now so I’ll just summarize ) The one nice thing about writing vanilla CSS is that when something breaks or needs to be tweaked you can pop open the dev tools and find the exact file and line where the offending CSS lives....

Use SSH agent forwarding to deploy via Capistrano

Setting up and maintaining deploy keys in github can be annoying. If you’re looking for a workaround, follow github’s instructions to deploy using your own personal SSH key. Moving forward, we’ll assume you’ve generated SSH keys on your local machine. Step 1: add a few lines to the ~/.ssh/config file on your local machine. We’re...

Update WordPress & Plugins over SSH

For security reasons, we don’t typically enable FTP on any of our servers. WordPress downloads core and plugins via FTP, so updating usually involves doing it locally and then deploying the changes. In most cases WordPress core isn’t included in the repo, so that has to be done manually : ssh into the server, wget...

Serving @font-face fonts to Firefox from an S3 bucket

I’m building a Rails site that uses the excellent asset_sync gem to push my assets up to an S3 bucket on deploy, and I ran into an issue where @font-face fonts were rendering fine in all browsers except Firefox. After a little googling, I found that it’s an issue with Firefox’s “file uri origin” policy. http://stackoverflow.com/questions/2856502/css-font-face-not-working-with-firefox-but-working-with-chrome-and-ie http://stackoverflow.com/questions/5008944/how-to-add-an-access-control-allow-origin-header The...

Wave Hill Launches

This week we launched the new website for Wave Hill, the beautiful public garden and cultural center that overlooks the Hudson River in the Riverdale section of the Bronx. As with any cultural institution, be it a garden, museum, park, or theater, our challenge was to design and build a site that would showcase the best...

Upgrading to Lion

I just upgraded to Lion and ran into a few issues trying to compile Ruby via RVM. Turns out you need to update Xcode and manually install the Command Line Tools. Makes sense, but I got hung up for a few minutes trying to figure out why it didn’t “just work.” UPDATE I also had...