Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jasmine: did not find expected alphabetic or numeric character while scanning an alias

While going through http://testfirst.org/learn_javascript, I tried to run rake jasmine in the 00_hello/ folder. I get this error:

hugos-MacBook-Pro:00_hello hugo$ rake jasmine --trace
(in /Users/hugo/Developer/test_first_javascript/learn_javascript)
** Invoke jasmine (first_time)
** Invoke jasmine:server (first_time)
** Invoke jasmine:require (first_time)
** Execute jasmine:require
** Execute jasmine:server
your tests are here:
  http://localhost:8888/
rake aborted!
(<unknown>): did not find expected alphabetic or numeric character while scanning an alias at line 5 column 7
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/config.rb:19:in `simple_config'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/config.rb:62:in `spec_dir'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/runner_config.rb:32:in `spec_dir'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/application.rb:28:in `block (2 levels) in app'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:141:in `new'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:141:in `block in generate_map'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:141:in `each'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:141:in `generate_map'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:128:in `to_app'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:55:in `app'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/application.rb:14:in `app'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/server.rb:3:in `initialize'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/tasks/jasmine.rake:51:in `new'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/tasks/jasmine.rake:51:in `block (2 levels) in <top (required)>'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `load'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `<main>'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => jasmine => jasmine:server

I did some investigating and came across this: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680227. It might be that my ruby parser is wrong / I'm using the wrong version of ruby.

hugos-MacBook-Pro:00_hello hugo$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]

Thoughts?

like image 233
Hugo Avatar asked Oct 19 '12 21:10

Hugo


1 Answers

Seems like you yaml have some characters that don't work. Look at your spec/support/jasmine.yaml, you may have something like:

- **/*.js

just replace it with:

- '**/*.js'
like image 78
Bastien Gallay Avatar answered Nov 12 '22 01:11

Bastien Gallay