Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Can't open ... guard-jasmine.coffee #78

Closed
Rudikza opened this Issue Sep 14, 2012 · 6 comments

Comments

Projects
None yet
2 participants

Rudikza commented Sep 14, 2012

Hi,

I am using ubuntu 12.10, phantomjs 1.6.0-5ubuntu1 and guard-jasmine 1.8.1 and when I try to start guard I get the following error:

Guard::Jasmine starts webrick test server on port 8888 in development environment.
Waiting for Jasmine test runner at http://localhost:8888/jasmine
Run all Jasmine suites
Run Jasmine suite at http://localhost:8888/jasmine
Can't open '/home/blag/.rvm/gems/ruby-1.9.3-p194/gems/guard-jasmine-1.8.1/lib/guard/jasmine/phantomjs/guard-jasmine.coffee'
ERROR: No response from the Jasmine runner!

After some research on the internet I also tried the following:

$ phantomjs /home/blah/.rvm/gems/ruby-1.9.3-p194/gems/guard-jasmine-1.8.1/lib/guard/jasmine/phantomjs/guard-jasmine.coffee 
Can't open '/home/blah/.rvm/gems/ruby-1.9.3-p194/gems/guard-jasmine-1.8.1/lib/guard/jasmine/phantomjs/guard-jasmine.coffee'

The file is definitely there and accessible:

$ head /home/blah/.rvm/gems/ruby-1.9.3-p194/gems/guard-jasmine-1.8.1/lib/guard/jasmine/phantomjs/guard-jasmine.coffee
# This file is the script that runs within PhantomJS, requests the Jasmine specs
# and waits until they are ready.
phantom.injectJs 'lib/result.js'

Any ideas on what the problem might be?

Contributor

netzpirat commented Sep 15, 2012

What a strange error, I didn't see this before. It runs fine over here on phantomjs 1.6.1 and it was also running fine on the older versions.

First make sure the Rails app with the Jasmine specs is running fine by simply open it in your browser at the shown URL http://localhost:8888/jasmine. You should see the normal Jasmine runner output.

Next try the plain CoffeeScript PhantomJS runner without any Ruby, by using the little helper guard-jasmine-debug binary. This should output a JSON spec result that is then further processed by the Ruby Guard plugin.

Without a running Rails Jasmine test runner, the helper gives a nice error message

$ guard-jasmine-debug
{"error":"Unable to access Jasmine specs at http://127.0.0.1:3000/jasmine"}

And it verifies that the script runs fine.

Contributor

netzpirat commented Sep 17, 2012

Any update on this?

Rudikza commented Sep 17, 2012

Edit:

My apologies, I downgraded to ubutnu 12.04 and I assumed that the phantomjs version would be the same as for 12.10 but it turns out that the phantomjs version is 1.4.

Once I installed 1.6.0 everything worked as expected.http://localhost:8888/jasmine

Contributor

netzpirat commented Sep 17, 2012

I guess this is a PhantomJS problem that gives a strange Can't open ... error. I changed the runner, so it uses the precompiled vanilla JS runner instead the CoffeeScript one.

Can you please try it by using the current head in your Gemfile:

gem :jasmine, :git => 'git://github.com/netzpirat/guard-jasmine.git'

Rudikza commented Sep 18, 2012

I've tested and guard-jasmine now works with phantomjs 1.4.0

Contributor

netzpirat commented Sep 18, 2012

Great! Thanks for the additional infos. I've release 1.8.2 that fixes the issue.

@netzpirat netzpirat closed this Sep 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment