testdouble / jasmine-rails

A Jasmine runner for rails projects that's got you covered in both the terminal and the browser
http://rubygems.org/gems/jasmine-rails
MIT License
378 stars 154 forks source link

"can't load the address!" error in jasmine-runner.js when using phantomjs 2.0 #158

Closed christiannelson closed 9 years ago

christiannelson commented 9 years ago

PhantomJS 2.0 was released on January 23, 2015 and is default version when installing phantomjs via brew.

Running jasmine-rails against phantomjs 2.0 results in the following error:

% rake spec:javascript --trace
** Invoke spec:javascript (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute spec:javascript
Running `"phantomjs" "/Users/christian/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/jasmine-rails-0.10.6/lib/jasmine_rails/../assets/javascripts/jasmine-runner.js" "/Users/christian/Projects/carbon-five/raygun-rails/tmp/jasmine/runner.html?spec="`
Running: /Users/christian/Projects/carbon-five/raygun-rails/tmp/jasmine/runner.html?spec=
can't load the address!
rake aborted!
Error executing command: "phantomjs" "/Users/christian/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/jasmine-rails-0.10.6/lib/jasmine_rails/../assets/javascripts/jasmine-runner.js" "/Users/christian/Projects/carbon-five/raygun-rails/tmp/jasmine/runner.html?spec="

All is well after switching back to 1.9.7.

searls commented 9 years ago

Welp.

On Mon, Feb 9, 2015 at 12:05 PM, Christian Nelson notifications@github.com wrote:

PhantomJS 2.0 was released on January 23, 2015 and is default version when installing phantomjs via brew. Running jasmine-rails against phantomjs 2.0 results in the following error:

% rake spec:javascript --trace
** Invoke spec:javascript (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute spec:javascript
Running `"phantomjs" "/Users/christian/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/jasmine-rails-0.10.6/lib/jasmine_rails/../assets/javascripts/jasmine-runner.js" "/Users/christian/Projects/carbon-five/raygun-rails/tmp/jasmine/runner.html?spec="`
Running: /Users/christian/Projects/carbon-five/raygun-rails/tmp/jasmine/runner.html?spec=
can't load the address!
rake aborted!
Error executing command: "phantomjs" "/Users/christian/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/jasmine-rails-0.10.6/lib/jasmine_rails/../assets/javascripts/jasmine-runner.js" "/Users/christian/Projects/carbon-five/raygun-rails/tmp/jasmine/runner.html?spec="

All is well after switching back to 1.9.7.

Reply to this email directly or view it on GitHub: https://github.com/searls/jasmine-rails/issues/158

christiannelson commented 9 years ago

@searls Hehe... I like "welp" as an acknowledgement. :)

Sorry I haven't looked into it any further, I wanted to capture the issue now since I don't have time to look into it. I might have time next week.

searls commented 9 years ago

Released 0.10.7 to guard against this for gem users https://github.com/searls/jasmine-rails/releases/tag/v0.10.7

searls commented 9 years ago

Would you mind spending a little time debugging this? I don't spend much time maintaining jasmine-rails, but I could see how this is exactly the sort of thing I'm about to see a bunch of issues over.

On Mon, Feb 9, 2015 at 12:18 PM, Christian Nelson notifications@github.com wrote:

@searls Hehe... I like "welp" as an acknowledgement. :)

Sorry I haven't looked into it any further, I wanted to capture the issue now since I don't have time to look into it. I might have time next week.

Reply to this email directly or view it on GitHub: https://github.com/searls/jasmine-rails/issues/158#issuecomment-73549114

cemeng commented 9 years ago

@searls just played around a bit with PhantomJS 2 and rails-jasmine - I can get it to work when appending file:// in front of runner.html filename. E.g:

"phantomjs" "/Users/../assets/javascripts/jasmine-runner.js" "file:///Users/cemeng/mylittleproject/tmp/jasmine/runner.html?spec=MySpec"

I might submit a PR for this later when I got time - but looks like an easy fix at least. Can't work out what's changed in PhantomJS 2 that causes this change tho.

searls commented 9 years ago

Landed in 0.10.8