angular.js and phantom.js error

I am getting an error when i try running phantomjs via this stack: rails (3.2.11), rspec (2.12.2), capybara (1.1.4), poltergeist (1.0.2), phantomjs (1.8.1) and angular.js (1.1.2).

I have many specs that run fine on this stack, without angular. But on a test page where I initiate angular, I get the follow error. When I run the specs using selenium driver, they pass.

{"name"=>"visit", "args"=>["http://127.0.0.1:57124/pages/angular"]}
{"response"=>{"status"=>"success"}}
{"name"=>"find", "args"=>["./descendant-or-self::*[contains(normalize-space(.), 'Hello')]"]}
{"error"=>{"name"=>"Poltergeist.JavascriptError", "args"=>[[{"message"=>"TypeError: 'undefined' is not an object (evaluating '$lastDestination.offset().top')", "stack"=>"TypeError: 'undefined' is not an object (evaluating '$lastDestination.offset().top')
at http://127.0.0.1:57124/assets/application.js:13100
at http://127.0.0.1:57124/assets/application.js:3046
at  http://127.0.0.1:57124/assets/application.js:2722"}]]}}

This occurs even on the most bare bones content, only without any other ng directives (no controller instantiated etc), eg

<div ng-app>
  <h1>Hello</h1>
</div>

The spec looks like

describe 'ng_posts', type: :request, js: true do
  it "should load page" do
    visit '/pages/angular'
    page.should have_content('Hello')
  end
end

This appears to be a phantom.js bug because the page loads in the browser (no errors in js console) and the specs run with Selenium. Is this a known issue? Can i get past it? Thanks.

Jon

nevermind. Turns out it was a bug in another library, zurb-foundation (alternative to twitter bootstrap) which was fixed a week ago but the gem update didnt have it yet. Updating Gemfile as follows fixed it.

gem 'zurb-foundation', github: 'zurb/foundation'