Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Rajan Agaskar

Posts By

Working with the Cloud Controller API in Ruby: Beyond CFoundry.

Cloud Controller is the primary API through which third parties interact with Runtime; it encapsulates the myriad internal services that take a user from ‘cf push’ to a running application. Both the Pivotal Developer Console (the web application that ships …

Read more

Read More

Restart post-migration


Exceptional / Airbrake?

Exceptional purchased Airbrake

APIs are different, is there a clear winner?

No clear winner -- errbit is an open source solution that uses the airbrake gem.


Turns out... heroku restart

The only logical explanation we have for the bug with update_attributes failing silently is that we migrated without restarting. We speculate that some dynos had cached the old schema and never got the update (before restarting).

Rspec 'have_content'

If you use the CSS text-transform: uppercase property on some content that you wish to test with have_content, then:

  • it will actually match on the original case of your text
  • in case of failure, it will display the UPPERCASED expected text, so you'll get interesting messages such as:

expected there to be content "NOV" in "NOV 8, 2012 — DEC 8, 2012"

Read More

Capybara 2.0 is out.


SPF/DKIM for validating received email From: field?

We're working on a feature where a user can reply to emails. We want to trust the "From:" field to identify the user, but aren't sure how to set everything up properly.

We're using SendGrid's "Parse API" to receive the emails, and it tells us that we get an spf 'permerror' when sending from, but not from regular or What gives?

SPF only authenticates the envelope domain, so headers can't be trusted. DKIM has the option to auth specific headers, so you may be able to trust DKIM.


Capybara 2.0 released!topic/ruby-capybara/C0O7nP2YG1A

  • Error on ambiguous match
  • Drop Ruby 1.8 support
  • External gems like capybara-webkit may not be compatible yet
  • Not backwards compatible with 1.x

Read More

Try using Mongo


AR/PG silently not saving commits under heavy load

  • People wondered if the transaction was getting rolled back, etc, everything seemed normal, but about 1 in 5 times the record wouldn't write after an update_attributes.

Slanger for Pusher testing?

  • Nobody has used Slanger.


Rspec and_call_original

New with Rspec 2.12, rspec mocks now have the ability to call through to the original implementation.

example: banana.should_receive(:split).and_call_original

asserts that banana.split was called, and also executes banana.split

Don't commit Gemfile.lock in your gems



ACCORDING TO YEHUDA ... if you are maintaining a GEM

git rm --cached Gemfile.lock echo "Gemfile.lock" >> .gitignore git add .gitignore git ci -m "Remove Gemfile.lock -- cf."

(this advice may be controversial)

AWS ELB overwrites X-Forwarded-Proto and X-Forwarded-Port

Read More

New Rails, Ruby patches. Download them.


Adding an "external" dependency

The heroku_san gem used to depend on the Heroku CLI gem, 'heroku' which has been sunsetted in favor of the Heroku Toolbelt. What's a reliable way of including this dependency in the gem library?


Smallest Federated Wiki

Ward Cunningham, inventor of the Wiki, has been working on a sequel called "Smallest Federated Wiki". It's packed with novel ideas about collaboration, markup, mobile emphasis, etc.

Best resources so far: Presentation at RealTimeConf


New Rails and Ruby patches

patch 327 is avail. for Ruby:

rails 3.2.9 is out this morning:

Read More

Standup 03/12/10


Q: How can I plot thousands of points on a Google Map without said map being undraggable? A: It may make sense to use Google's HeatMap API after the number of plotted points exceeds 500. Other strategies are discussed here: Handling Large Amounts of Markers in Google Maps


  • Using ReCSS with Sass. If you happen to be using SASS you can still make use of awesome ReCSS bookmarklets (including one by Pivotal's own Erik Hanson) by using the compass command line tool and watching your project for changes. Totally rad!

  • Ruby Enterprise Edition Is awesome, if you use the garbage collection tweaks. One team installed it and saw a 50% savings in their test suite running times -- over 15 minutes! Combined with parallel spec it can be a real winner. If you're on Leopard, you may need to install the version from Oct 2009, as the latest fails with a Marshall.load error on install. 2 legit!

  • All your RubyMine problems can be fixed! By reverting to RubyMine 1.1.1. At least if your problems are: inconsistent functionality with the merge tool, and RubyMine occasionally refusing to recognize spec files correctly. That's def!

  • Spring Forward this Sunday to save the daylight, and terrorize the programmers. Thanks a lot, farmers-slash-botanists. WORD Y'ALL. I'M OUT.

Read More

Standup 12/10/2009


  • Fast/Simple share widget plugins? A project was in need of a turn-key plugin to provide Digg/Twitter/Facebook links. The two suggestions were the ever-popular "roll-your-own", and pivotal's own bookmark_fu. The latter of which, if you glance downwards and towards the right, you'll see in use on this very blog! (Unless, of course, you're using Google Reader and robbing us of our ad revenue riches).


  • SpecRails Superclass Shenanigans

A Pivot found that when spec_rails is loaded, the superclass of spec suites changes to ActiveSupport::TestCase, instead of ExampleGroup (which, in this case, had a number of useful and necessary methods added to it). [1]

This carefully named plugin provides really nice sql-console-style formatting for ActiveRecord queries made from the irb console. I'm going to install it right away so I can pretend I still remember how to write MySQL queries by hand!

[1] I was working on a brilliant analogy that referenced Dick Dastardly and Muttley here, but I totally failed. Still, Wacky Races was totally rad, right? Radder than sneakily replacing superclasses, anyhow.

Read More

Standup 12/9/2009

Interesting Things

  • Fixjour blows up on validations for associated models

    Two Pivots experienced this problem on separate projects. The general consensus was that generating objects with correct associations can be difficult. FactoryGirl was recommended as a fixture plugin that handles this problem particularly well. It was also suggested that rolling your own object mothers was trivial (fisticuffs ensued).

  • timeout.rb

Timeout.rb raises an exception to kill child threads; it so happens that this exception can be caught, and possibly swallowed. This is truly a Noid to be avoided at all costs.

When Paperclip cannot find identify in the path, it will raise an error that suggests it has been called with incorrect arguments. This is a bold-faced lie.

One Pivot remarked that these tests should really be mocking Paperclip in the first place, which seems an appropriate response to dishonesty.

Read More

Standup 12/8/2009

Interesting Things

  • - Javascript, DST, and You

In 1895, George Vernon Hudson somehow managed to convince the world (of the Wellington Philosophical Society) that Daylight Savings Time was a good idea.[1] Hudson, an amateur entomologist, was motivated by his desire to look for bugs after work.[2] Sadly he did not forsee that determining DST for multiple regions using JavaScript would be a non-trivial task.

Javascript provides some rudimentary timezone support with Date.parse, but does not automatically apply daylight savings time, in other words:

Date.parse('Sep 9 2009 11:00:00 PST');


Date.parse('Sep 9 2009 11:00:00 PDT');

return different timestamps. (a plugin for the fleegix.js library) lets you express the timezone as a region string, automatically taking into account whether or not that region observes Daylight Savings Time (by using Olson files), and providing the same interface as the native Javascript date. This means you can get an proper timestamp with the following:

new'9/9/2009 11:00:00', 'America/Los_Angeles');

This is arguably more useful than Daylight Savings Time itself.

  • RightScale errors

Two Pivots experienced an issue where RightScale was caching their connection to Amazon upon creation. This led to the connection start time parameter getting further and further out of date until Amazon failed to accept the upload with a 'Request Time Too Skewed' error. No workaround was discussed, but it was roundly decided that any error with the word "Skewed" in it is pretty awesome. [3]

[1] Well, according to Wikipedia, so it might as well have been Ron Paul for all we know.

[2] aaaaaand rimshot.

[3] Not really.

Read More

Standup 12/7/2009

Interesting Things

  • Pivotal Core Bundle - Deprecations deprecated!

Two Pivots heroically removed some deprecated extensions and rake tasks from the Pivotal Core Bundle. Do not be surprised if your favorite code jams (like cancel_default_validates_associated class method) disappear next time you pull.

  • Move files fast! Some lucky pivot discovered that mv file.tgz * will move all files in the current path into the last file or directory it can find.

If for some reason you do not want this to happen, it is recommended that you always specify a destination when moving files.

To help you remember this protip, here's a totally worthless analogy that involves automobiles: would you get into a cab without telling the driver where you wanted to go?

No, you would not, because he would take you to IHOP, and you hate pancakes. You wanted to go to Waffle House, which is unfortunate, because the nearest Waffle House is in Nevada.

Read More