undefined method 'ToString' when trying to run cucumber #23
Comments
Wow, that came out ugly. Here's a gist of the trace: http://gist.github.com/413405 You can check out the 'coffee' branch on my repo to see what I'm running: github.com/coreyhaines/purely_functional_data_structures |
Hmm.. There was a bug in the to_s method of V8::Object, and so I bet that the cucumber support was working around it by calling the native V8 method ToString() (you can tell native V8 methods because they are PascalCase). I fixed that bug in between 0.6.3 and 0.7.0, so probably need to fix the cucumber. I'll verify though. In other words, the fix broke the workaround. |
Cool, thanks. I was wondering what was up with the Pascal casing. My head was thinking java, for some reason. I actually looked at my code to see if I was pascal-casing it. Nope. Phew! Thanks. |
Yep. That's definitely the case. You can probably work around it by subsituting all the ToString() calls to to_s() |
Corey, I got your tests passing by patching cucumber.... and they ran in less than .5s! Also, be sure to grab the latest racer code. cheers, |
Awesome! Thanks. I'll grab that and try it out tonight. The timing sounds wonderful, too. |
Hmm... The link to the commit takes me to octokitty. |
I'll pull cucumber from your fork and try it out. (wow, that sentence is awesome) |
Brilliant!!! Works in an even more fantastic manner than before. |
Glad to hear it. I always forget that it only searches SHAs inside the current project and not globally. I fixed the link above, but it sounds like you got it. cheers, |
Yeah, I rebuilt and installed cucumber from your fork, rather than aslak's |
Probably should put this in the cucumber issues list, as well, but I know you guys are working closely together. I just upgraded therubyracer and I get this error when I try to run cucumber (stack trace below). Thoughts? My scenarios were running before.
undefined method
ToString' for #<V8::Object:0x10034c7d0 @native=#<V8::C::Object:0x10034d720>> (NoMethodError) /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/js_support/js_language.rb:37:in
initialize'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/js_support/js_language.rb:140:in
new' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/js_support/js_language.rb:140:in
add_step_definition'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/to.rb:39:in
call' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/to.rb:39 /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:29:in
call'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:29:in
Run' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:29:in
eval'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:108:in
enter' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:24:in
eval'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:23:in
try' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:23:in
eval'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:43:in
evaluate' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:48:in
load'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:47:in
open' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/therubyracer-0.7.0/lib/v8/context.rb:47:in
load'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/js_support/js_language.rb:31:in
send' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/js_support/js_language.rb:31:in
method_missing'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/js_support/js_language.rb:117:in
load_code_file' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/step_mother.rb:84:in
load_code_file'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/step_mother.rb:76:in
load_code_files' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/step_mother.rb:75:in
each'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/step_mother.rb:75:in
load_code_files' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/cli/main.rb:56:in
execute!'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/../lib/cucumber/cli/main.rb:25:in
execute' /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/gems/cucumber-0.7.3/bin/cucumber:8 /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/bin/cucumber:19:in
load'/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p249/bin/cucumber:19
The text was updated successfully, but these errors were encountered: