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

Headless && Head OK

Brian Cunnie
Friday, June 15, 2012

Helps

  • asset pipeline testing with RSpec render_views

I’m trying to test the asset pipeline configuration in our project. I’ve tweaked our test environment to it won’t automatically compile assets;

environments/test.rb:
…
if ENV['ASSET_PIPELINE']
config.assets.compile = false
else
config.assets.compile = true
end
…

alas in controller specs that have render_views, breaks:

ActionView::Template::Error:
controllers/application.js isn’t precompiled.

(which is not true)

in most cases I can remove render_views, but that’s not ideal.

–

To fix it, make sure digest is true.

  • capybara-webkit + headless + lobot CI => Locking assertion failure

Tried sloppy locking and downgrading libx11 to 1.0.3, but no success.

Probably a Qt error, make sure Qt is 4.8.1 or 4.8.2 or try recompiling Qt or dependencies.

Interestings

  • rake db:test:prepare with spork

We got frustrated having to shut down spork every time we wanted to run a migration.

We dug in, and found that we needed to close the ActiveRecord::Base connections in the prefork block. ActiveRecord automatically reestablishes the connection post fork.

We opened a pull request on spork-rails with the fix:

https://github.com/sporkrb/spork-rails/pull/9

  • javascript:

Chrome and other browsers are now stripping out ‘javascript:’ from the beginning of urls that are pasted into the addressbar. This is not a problem with links that start with ‘javascript:’

  • Head OK, empty body, JQuery == bad mixture

“Head OK” with an empty body returns a single space & confuses JQuery because a single-space string is invalid JSON. A work-around is to set the content-type to NOT be application/json. Or render :text => ” or render :json => {}

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Add New Comment Cancel reply

Your email address will not be published.

Brian Cunnie

Brian Cunnie
San Francisco

Recent Posts

  • QuickBooks “Error: Connection Has Been Lost”
  • Getting rid of "VMware Shared Folders" under OS X
  • Enabling OS X Screen Sharing from the Command Line
Subscribe to Brian's Feed

Author Topics

ops (5)
vlan (1)
chef (2)
open directory (1)
bonjour (1)
djbdns (1)
dns (1)
dns-sd (1)
tinydns (1)
agile (3)
  • 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 >