Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Tools
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker
Jeff Hui

[SF] Where’s Select 1?

Jeff Hui
Tuesday, February 12, 2013

Events

Tuesday: Ruby Meetup

Meet after work to go there:

http://www.sfruby.info/events/96446412/

Thursday: Thursday night pair exchange

In addition to the regular Tuesday event. Same time, 6:15 – 9:00.

Friday: Block Party

http://engine.is/blockparty

next Friday celebrating start ups in SF w/food trucks at lunch time.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Jeff Hui

[SF] The Year of the Snake

Jeff Hui
Monday, February 11, 2013

Events

Friday: Block Party

http://engine.is/blockparty

next Friday celebrating start ups in SF w/food trucks at lunch time.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Phil Goodwin

“expect errors”

Phil Goodwin
Friday, February 8, 2013

Helps

"expect errors" when compiling Ruby with clang

Compiled Ruby with clang and the compile output contained a warning to "expect errors". Has anyone experienced these alleged errors?

One member or our audience said that they had compiled the same way and not experienced any problems.

Interestings

Update your rack gem

Nasty remote execution vulnerability.

rack.github.com

parallel_tests prepare task does not drop tables

If you're using parallel_tests, be aware that, unlike rake db:test:prepare, the rake parallel:prepare task does not purge the databases before it loads the schema. You'll only notice this if you're dropping tables – the dropped tables will stay forever in the parallel databases.

We have a fork that works properly. (Pull request coming soon.)
https://github.com/pivotal-gemini/parallel_tests

Events

02/15: Block Party

http://engine.is/blockparty

next Friday celebrating start ups in SF w/food trucks at lunch time.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
George Dean

A Stately Resque

George Dean
Thursday, February 7, 2013

Helps

ActiveRecord save race condition in Resque

We have a Rails app that is saving a new ActiveRecord object, and then immediately afterwards, enqueueing a Resque job that looks up that record by its ID. Sometimes, the lookup inside the resque job fails – it claims no such row with that ID exists.

If we put the lookup into a loop that catches that exception and retries the exact same lookup, it always eventually succeeds, usually after 1-2 seconds.

The ID exists on the ActiveRecord object before the job is enqueued, which (I think) means that the save transaction has completed. But the resque job is using a different database connection, so maybe there's some weird caching going on? But here Google has failed us.

Any ideas? We could leave it in a loop that catches the exception, sleeps 1 second, and retries, but: ugh.

Some ideas from the audience:
There is a connection object that can be queried about transaction states.
Wait for transaction count increment/decrement?
Could be a problem with the way that sqlite fakes nested transactions.

Best practices for individual users on GitHub

Usually we have a single GitHub account for a project that contains a key for each of the machines being used on a project. On our project we want to use a separate account for each person on the project. Is there a way to do this without a lot of trouble shuffling SSH keys around?

Pivotal Git Scripts may have some tools for this.
You can also use HTTPS URLs and enter username/password on each commit.

Interestings

Lobot – Now with per-project chef recipes

If you need to write your own chef recipes to install your project's dependencies, you can add a cookbooks directory to the root of your project. Make sure to delete the cookbook_paths section from your lobot.yml (to use the default values), or add ./chef/project-cookbooks to the cookbook_paths section.

So, to have a bacon recipe, you should have cookbooks/pork/recipes/bacon.rb file in your repository.

Stately – A font of the US states

http://intridea.github.com/stately/

For all those times you need a vector representation of the USA and to color the states separately.

Apiary – Public API documentation

http://apiary.io/

Takes a well formed file and generates really usable REST API documentation. Integrates with Github for collaboration

Events

Thursday: Inaugural Thursday Night Pair Exchange tonight

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
George Dean

Test automation for iOS and smooth jazz

George Dean
Wednesday, February 6, 2013

Interestings

Appium – test automation tool for native and hybrid mobile apps

Does anyone have any experience with it?

Appium is an open source test automation tool for native and hybrid iOS apps.

  • Use Ruby, Java, Javascript etc.. to write your tests.

  • You don't have to recompile your app or modify it in any way because Appium's automation is based on Apple's UIAutomation library

http://appium.io

Smooth Jazz Nyan Cat Formatter hits 0.1.3

http://rubygems.org/gems/smooth-jazz-nyan-cat-formatter

With some display fixes. Coming eventually, configure your own music and cat!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
George Dean

iFrame you frame…

George Dean
Tuesday, February 5, 2013

Helps

undefined method `fields' for nil

We keep getting this error across multiple projects & machines, with different versions of the pg gem and the PostgreSQL server, with varying consistency. Switching the tests to sqlite seems to fix it.

Failure/Error: Unable to find matching line from backtrace
ActiveRecord::StatementInvalid:
  NoMethodError: undefined method `fields' for nil:NilClass: SELECT "locations".* FROM "locations"  WHERE "locations"."id" IN (11, 10, 5, 4, 1, 3, 2)

It appears that PG::Connection#async_exec is returning nil for some queries.

It was suggested to add a "fields" method for the nil class.

Interestings

Homebrew is Kickstarting an automated test bot

http://www.kickstarter.com/projects/homebrew/brew-test-bot £50 to get a pair of pint glasses…

Resizing the window to test media queries

If you want to test your media query css as part of your acceptance suite, you can just ask Capybara to resize the firefox window.
Don't use the iframe to do this, because it will be buggy. Note you will need to use min/max-width not min/max-device-width when defining your media queries. Otherwise resizing the browser window will not trigger the media query.

Capybara.current_session.driver.browser.manage.window.resize_to(width, height)
Capybara.current_session.driver.browser.manage.window.position = Struct.new(:x, :y).new(session_name == :default ? 0 : width, 0)

Thanks to Ryan for the tip.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
George Dean

Beware RubyMine 5!

George Dean
Monday, February 4, 2013

Helps

MySQL lock wait timeout exceeded with timecop and parallel test

(Alexander & Matt)

We want to make sure that our fixtures don’t get out of sync with our test suit. So we wrapped everything into timecop. Now we are getting “Mysql2::Error: Lock wait timeout exceeded” when running “rake parallel:spec”. The offending database call is a “Fixture Delete”.

Interestings

RubyMine 5 scary find & replace

(Will Read)

The latest RubyMine EAP find & replace doesn’t seem to respect exclusions. BE AWARE.

A beta was released over the weekend which may or may not fix it.

Yard

(Matt & Will)

Yard doc is a pretty sweet way to generate some documentation. On our project, we had developed a little system of helper methods for our acceptance test suite (a DSL if you will), and we could not remember the names of everything, so we wanted to organize and expose it. After installing the yard gem (and the redcloth gem), we were able to generate documentation with “yard server –reload”. This runs a web server that we can hit during development that reloads on every request.

http://yardoc.org/

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Helge Holzmann

02/01/2013 – Don’t Byte Me (SF STANDUP)

Helge Holzmann
Friday, February 1, 2013

Interestings

Don’t Byte Me

If you’re looking at your code and realizing “I need this number in bytes, not MB so I can use Rails’s handy number_to_human_size helper”, don’t forget that the Numeric class is there to help!

5.megabytes => 5242880 == 5*1024*1024

number_to_human_size(5.megabytes) => “5 MB” == YAHTZEE!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Helge Holzmann

1/31/2013 – find_by_name where name is strange (SF STANDUP)

Helge Holzmann
Thursday, January 31, 2013

Helps

find_by_name where name = 0

In Rails, User.find_by_name(“myName”) will run sql like “SELECT users.* from users where users.name = ‘myName’”

We have found that it is occasionally producing “SELECT users.* from users where users.name = 0″.

This is invalid and will give a database error. Help!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Helge Holzmann

1/29/2013 – Rails hacked again (SF Standup)

Helge Holzmann
Tuesday, January 29, 2013

Interestings

Rails hacked (again)

The 3.0.x and 2.3.x lines are affected. It’s a mega security flaw in JSON parsing. Upgrade your old apps now. 3.1.x and 3.2.x lines unaffected. Read more here: https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo

Events

Tuesday: Xtreme Tuesday

Talk about Software Development and Agile.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (783)
  • rails (117)
  • testing (90)
  • ruby (86)
  • ruby on rails (71)
  • jobs (62)
  • javascript (59)
  • techtalk (44)
  • ironblogger (42)
  • rspec (39)
  • bloggerdome (34)
  • productivity (34)
  • activerecord (30)
  • rubymine (30)
  • git (29)
  • gogaruco (29)
  • nyc (27)
  • design (24)
  • mobile (23)
  • pivotal tracker (22)
  • process (21)
  • cucumber (21)
  • jasmine (19)
  • ios (18)
  • tracker ecosystem (17)
  • webos (17)
  • objective-c (17)
  • fun (16)
  • android (16)
  • palm (16)
  • ci (16)
  • "soft" ware (16)
  • bdd (15)
  • tdd (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • css (14)
  • gem (13)
  • mouse-free development (12)
  • selenium (12)
  • goruco (12)
  • bundler (12)
  • api (12)
  • keyboard (11)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
Subscribe to Standup Feed
  1. ←
  2. 1
  3. 2
  4. 3
  5. 4
  6. 5
  7. 6
  8. 7
  9. 8
  10. 9
  11. ...
  12. 91
  13. →
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Tools
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >