Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

coffeescript NameError #79

Closed
greezeyfreezey opened this issue Nov 15, 2011 · 18 comments
Closed

coffeescript NameError #79

greezeyfreezey opened this issue Nov 15, 2011 · 18 comments

Comments

@greezeyfreezey
Copy link

I am using jasmine with jenkins and everytime i try to run a build i see the follow error..

** Execute jhw
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/jasmine-headless-webkit-0.7.3.1/bin/jasmine-headless-webkit:24: uninitialized constant CoffeeScript (NameError)
from /opt/ruby-enterprise-1.8.7/bin/jasmine-headless-webkit:19:in load' from /opt/ruby-enterprise-1.8.7/bin/jasmine-headless-webkit:19 rake aborted! Command failed with status (1): [jasmine-headless-webkit...] /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:insh'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in call' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:insh'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in sh' /var/lib/jenkins/workspace/trunk_jasmine/ideeli/lib/tasks/jhw.rake:4 /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain'
/opt/ruby-enterprise-1.8.7/lib/ruby/1.8/monitor.rb:242:in synchronize' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/opt/ruby-enterprise/bin/rake:19:in `load'
/opt/ruby-enterprise/bin/rake:19
Build step 'Invoke Rake' marked build as failure
Finished: FAILURE

@greezeyfreezey
Copy link
Author

also when trying to execute directly from CLI i still get the following

/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/jasmine-headless-webkit-0.7.3.1/bin/jasmine-headless-webkit:24: uninitialized constant CoffeeScript (NameError)
from /opt/ruby-enterprise-1.8.7/bin/jasmine-headless-webkit:19:in `load'
from /opt/ruby-enterprise-1.8.7/bin/jasmine-headless-webkit:19

@johnbintz
Copy link
Owner

Is the coffee-script gem also installed and accessible in your gem path?

@greezeyfreezey
Copy link
Author

yes

gem list |grep -i coffee
coffee-script (2.2.0)
coffee-script-source (1.1.2)

@johnbintz
Copy link
Owner

Try the latest git HEAD. I am explicitly requiring 'coffee-script' now in the runner, which should bring in that constant.

@johnbintz johnbintz reopened this Nov 16, 2011
@greezeyfreezey
Copy link
Author

i posted earlier but removed it.. now seeing

asmine-webkit-specrunner: cannot connect to X server rake aborted! Command failed with status (1): [jasmine-headless-webkit] /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in sh' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:incall' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in sh' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:insh' /var/lib/jenkins/workspace/trunk_jasmine/ideeli/lib/tasks/jhw.rake:4 /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in invoke_with_call_chain' /opt/ruby-enterprise-1.8.7/lib/ruby/1.8/monitor.rb:242:insynchronize' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /opt/ruby-enterprise/bin/rake:19:inload' /opt/ruby-enterprise/bin/rake:19 Build step 'Invoke Rake' marked build as failure Finished: FAILURE

@johnbintz
Copy link
Owner

For the first one: do you have a runtime installed? If you're using Node.js, have you tried specifying EXECJS_RUNTIME?

https://github.com/sstephenson/execjs/blob/master/lib/execjs/runtimes.rb#L56

I can't read the second one.

@greezeyfreezey
Copy link
Author

The first one i resolved with nodejs.. so i removed it from it this.. here is the second one again

** Execute jhw
Running Jasmine specs...
jasmine-webkit-specrunner: cannot connect to X server
rake aborted!
Command failed with status (1): [jasmine-headless-webkit]
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in sh' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:incall'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in sh' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:insh'
/var/lib/jenkins/workspace/trunk_jasmine/ideeli/lib/tasks/jhw.rake:4
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in invoke_with_call_chain' /opt/ruby-enterprise-1.8.7/lib/ruby/1.8/monitor.rb:242:insynchronize'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /opt/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /opt/ruby-enterprise/bin/rake:19:inload'
/opt/ruby-enterprise/bin/rake:19
Build step 'Invoke Rake' marked build as failure
Finished: FAILURE

@johnbintz
Copy link
Owner

Are you using xvfb?

@greezeyfreezey
Copy link
Author

I just installed xvfb because i noticed another post you were on that somebody did it but it still seems to fail.

@johnbintz
Copy link
Owner

Then I don't know what else to suggest, as I've never used xvfb. If you find out what's wrong, please post your solution somewhere so others know what to do. Gonna close this since the original problem, the missing CoffeeScript constant, is fixed.

@greezeyfreezey
Copy link
Author

Well here is the thing.. i removed the xvfb.. and i am still getting that error for cant connect to X server.

@greezeyfreezey
Copy link
Author

does Jasmine need X?

@johnbintz
Copy link
Owner

jasmine-headless-webkit does require an X server since it's a Qt WebKit application.

@greezeyfreezey
Copy link
Author

so odd.. not sure whats happening then.. trying to execute directly and getting this

./jasmine-headless-webkit -c -j /path/to/somewhere/spec/javascripts/support/jasmine.yml
'Running Jasmine specs...
jasmine-webkit-specrunner: cannot connect to X server

@johnbintz
Copy link
Owner

Unfortunately, I can't really help any more with this particular problem. I don't have any experience running truly headless apps. You'll have to find another place for help.

@greezeyfreezey
Copy link
Author

ok thanks alot for your help.

@morganchristiansson
Copy link

greezeyfreezey: try

xvfb-run ./jasmine-headless-webkit -c -j /path/to/somewhere/spec/javascripts/support/jasmine.yml

@brianjolly
Copy link

xvfb-run works great. Thanks Morgan.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants