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
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker
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
Helge Holzmann

1/28/2013 – Upgrade your Devises (SF Standup)

Helge Holzmann
Monday, January 28, 2013

Interestings

Devise vulnerability – upgrade now unless [Postgres, SQLite].include?(your database)

http://blog.plataformatec.com.br/2013/01/security-announcement-devise-v2-2-3-v2-1-3-v2-0-5-and-v1-5-3-released/

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Herval Freire

[NY] Standup 1/25

Herval Freire
Friday, January 25, 2013

Interestings

Beware of absolute paths when using unicorn and USR2

Using unicorns USR2 signal to restart does NOT re-read your unicorn config so be very careful with Capistrano deployments. See SO Q&A for details below:

http://stackoverflow.com/questions/9388074/restarting-unicorn-with-usr2-doesnt-seem-to-reload-production-rb-settings

Additionally you should specify several things in the config file, specifically the gemfile, or it won’t reload that either.
APP_ROOT = DIR
ENV['BUNDLE_GEMFILE'] = DIR/Gemfile

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Brandon Liu

[SF] Standup 1/23

Brandon Liu
Wednesday, January 23, 2013

Interestings

Unwrapping an annotated tag in Git

Annotated tags are their own "objects" and the sha does not point to the commit that they are tagging. In order to unwrap the tag, add ^{commit} to the original sha. This will not harm regular shas, so you can use it in scripts where you may encounter annotated tags.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Brandon Liu

[SF] Standup 1/22

Brandon Liu
Tuesday, January 22, 2013

Helps

How do I get sprockets to output its dependency graph?

Answer:

Call "dependency" method on an asset object.

What is first step in debugging remote irb that won't startup because of missing "readline" dependency?

Your ruby was compiled and then the readline library was deleted or moved. You probably need to recompile ruby. Likely that you have readline already, otherwise nothing would work.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Vinicius Baggio Fuentes

Happy Friday

Vinicius Baggio Fuentes
Friday, January 18, 2013

Helps

Tag successful builds in Travis CI

Is there a way to tag commits in git that are successful builds in Travis CI?

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (778)
  • rails (113)
  • testing (86)
  • ruby (83)
  • ruby on rails (70)
  • jobs (62)
  • javascript (53)
  • techtalk (44)
  • rspec (38)
  • activerecord (29)
  • productivity (29)
  • gogaruco (29)
  • ironblogger (29)
  • git (28)
  • nyc (27)
  • rubymine (25)
  • mobile (21)
  • cucumber (20)
  • bloggerdome (19)
  • process (19)
  • pivotal tracker (19)
  • design (18)
  • jasmine (18)
  • ios (18)
  • webos (17)
  • objective-c (17)
  • android (16)
  • palm (16)
  • "soft" ware (16)
  • fun (15)
  • tracker ecosystem (15)
  • ci (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • gem (13)
  • bdd (13)
  • selenium (12)
  • css (12)
  • goruco (12)
  • bundler (12)
  • tdd (12)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
  • mojo (10)
  • chef (10)
  • rubygems (9)
Subscribe to Standup Feed
  1. ←
  2. 1
  3. 2
  4. 3
  5. 4
  6. 5
  7. 6
  8. 7
  9. 8
  10. ...
  11. 89
  12. →
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • 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 >