Happy Holidays, New Relic!

18 Dec 2014

Happy Holidays, New Relic!

Our partners at New Relic sent us some new shirts. Thanks!

Happy Holidays, Engine Yard!

16 Dec 2014

Happy Holidays, Engine Yard!

Our friends at Engine Yard sent us a box of goodies. Happy Holidays!

Around we go

24 Oct 2014

Around we go

Am convinced that an ideal team size is one that can still fit together on a park carousel.

How are vinyl records pressed?

25 Aug 2014

Colby Aley, another talented 17 year old engineering intern in high school.

21 Aug 2014

The Retrospective Trifecta

19 Aug 2014

The Retrospective Trifecta

Continue reading …

The Results of the 2014 Rails Hosting Survey are in!

31 Jul 2014

We are proud to announce that we have released the results for the 2014 Ruby on Rails Hosting Survey! This year was an interesting challenge for us because we decided to display the results from previous years along with this year’s data.

How did we do that, you may ask? Charts! If a question was asked in a previous year, the viewer may switch the active color of the chart to highlight the data for that specific year. Neat-o!

We’ve made comments about what has changed throughout the years, but we want you to play around with the data and compare.

Thank you to everyone who participated this year!

Take a look at the Ruby on Rails Hosting Survey 2014.

Continue reading …

An Incremental Migration from Rails Monolithic to Microservices

23 Jun 2014

Using Named Scopes Across Models with ActiveRecord#Merge

23 May 2014

AlphaClone Making the Cover

12 May 2014

AlphaClone Making the Cover

When looking for an "expert" on things like stocks and investing, it's no surprise that Barron's, America's premier financial magazine, would turn to our partner at AlphaClone, Mazin Jadallah, for some advice (we would too!). Lookin' good Maz!

Video Testimonial: Oregon Coast Aquarium

1 May 2014

One of our wonderful clients, Marsh Myers, from Oregon Coast Aquarium shares his experience of working with Planet Argon on their Science education platform for Oregon high school students.

Video Testimonial: Open City Freight

21 Apr 2014

Learn why Robert McGinnis of Open City Freight partners with Planet Argon.

The Weekly Orbit - April 14-18

18 Apr 2014

Topics discussed in the chat room this week

Continue reading …

8 Insanely Useful ActiveAdmin Customizations

14 Apr 2014

Getting a Grasp on Scope in Javascript

11 Apr 2014

Easily add canonical URLs to your Rails app

4 Apr 2014

There has been a lot of talk lately about canonical URLs and how Google and other search engines would really prefer if you would use them. So, what is a canonical URL and why should you use them?

Continue reading …

On being "agile"

4 Apr 2014

The Weekly Orbit - March 24-28

28 Mar 2014

What we’re talking about

Continue reading …

Take the 2014 Ruby on Rails hosting survey

28 Mar 2014

It’s time to take the pulse of the Ruby on Rails hosting ecosystem again.

Continue reading …

Testing Chargify Direct with Capybara WebKit

28 Mar 2014

An overview of how we're using Capybara Webkit to mock Chargify for a Ruby on Rails application.

Continue reading …

Fixing Wordpress URLs When Using Rack

27 Mar 2014

In my last article I detailed how to run PHP through a Rack server. This works fairly well until you try to sign into the Wordpress admin section.

The problem is that Wordpress stores site URLs in the database and it will use these for some redirections. Luckily, with a few Rake tasks you can painlessly override them.

I borrowed some conventions from Rails and created a config/database.yml file. This is your run of the mill database connection file, nothing special here.

From there I created a Rakefile in the root of the project titled rakefile.rb.

I've been spoiled by Rails' database Rake tasks so I decided to build my own using ActiveRecord.

Here are the Rake task components that setup the ActiveRecord connections:

require 'yaml'
require 'logger'
require 'active_record'

namespace :db do
    def create_database(config)
        options = { :charset => 'utf8', :collation => 'utf8_unicode_ci'}

        create_db = lambda do |config|
            ActiveRecord::Base.establish_connection config.merge('database' => nil)
            ActiveRecord::Base.connection.create_database config['database'], options
            ActiveRecord::Base.establish_connection config

        rescue ActiveRecord::StatementInvalid => exception
            puts "There was an error creating the database. The error is: #{exception.message}" and return

        puts "Database #{@config['database']} was created."

    task :environment do
        DATABASE_ENV = ENV['DATABASE_ENV'] || 'development'

    task :configure_connection => :configuration do
        ActiveRecord::Base.establish_connection @config
        ActiveRecord::Base.logger = STDOUT if @config['logger']

Now that we have that out of the way, we can create our database create and drop table tasks. I put these in the db namespace.

desc 'Create the database from config/database.yml'
task :create => :configure_connection do
    create_database @config

desc 'Drops the database'
task :drop => :configure_connection do
        ActiveRecord::Base.connection.drop_database @config['database']
    rescue MySql2::Error => exception
        puts "There was an error dropping the database. The error is: #{exception.message}"
        puts "Database #{@config['database']} was dropped."

Now we can create and drop our database with the familiar commands of rake db:create and rake db:drop.

There is only one more thing to do and that's fix the Wordpress site URL references. I added the following task to the db namespace:

desc "Set Wordpress URL's to localhost"
task :fix_wordpress_urls => :configure_connection do
            "UPDATE wp_options SET option_value = 'http://localhost' WHERE option_name IN ('siteurl', 'home');"
    rescue ActiveRecord::StatementInvalid => exception
        puts "There was an error fixing the Wordpress URLs. The error is: #{exception.message}"
        puts "Wordpress URLs have been fixed."

With that final task we can now run this command:

rake db:fix_wordpress_urls

Now our Wordpress instance is ready to be run through Rack.

Final Thoughts

This is how I thought to manage this particular PHP/Wordpress hurdle in a Rails dominated environment. Hopefully some of you can apply this, and let us know if you have any other clever solutions.

Brief mention in the Portland Business Journal

26 Mar 2014

Wordpress and PHP on Rack

26 Mar 2014

We work primarily in Ruby on Rails, but every once and a while a client will need us to fix a critical bug in an existing PHP/Wordpress app that is slated to be deprecated.

We use Pow on our development machines. This is great for developing Rails applications but it does't play so well with other stacks that require port 80 to run.

There are some instructions out on the web that show you how to use Apache in conjunction with Pow so that both apps can be served simultaneously. This seemed like a little too much overhead, so I started poking around for a solution.

Did you know that PHP comes with an embedded web server? Yup, it's built in as of PHP 5.4 and OS X Mavericks comes with it pre-installed. If you're looking for a newer version, you can install 5.5 using homebrew-php.

Now that we don't need Apache to run PHP, we'll need something to proxy requests back to our embedded server. For this, I used Rack.

I setup a simple Gemfile with the following gems:

gem 'rack'
gem 'rack-legacy'

Then it's time to create our rackup file. Create a file titled and add the following:

require 'rubygems'
require 'bundler'


require 'rack'
require 'rack-legacy'

use Rack::ShowExceptions
use Rack::Legacy::Index
use Rack::Legacy::Php
run Dir.getwd

That's it! Place this file into the root of your PHP project and you should be able to call rackup from the terminal to start the Rack server. By default this will be at

There is one caveat though. At this time, Rack Legacy, will only respond to requests if it thinks that it's a valid PHP file.

From the Rack Legacy library this is called before a request is proxied:

def valid? path
    return false unless path =~ /\.php/

    path = path[1..-1] if path =~ /^\//
    path = path.split('.php', 2)[0] + '.php'
    path = ::File.expand_path path, @public_dir
    ::File.file? path

In our case this wasn't working for us because of the way that pretty URLs were being handled by Wordpress. In order to get around that, I monkey-patched Rack Legacy to simply pass all requests back to PHP.

Here is what I added to the file to make this happen:

class Rack::Legacy::Php
    def valid? path
        return true

With that change, the Wordpress site was working as expected.

How to: Delete a remote git tag

25 Mar 2014

The Weekly Orbit - Week of March 17th

24 Mar 2014

Topics discussed in the chat room this week

Continue reading …