Closed luvs closed 11 years ago
Have a similar problem here.
After installing yard-cucumber
plugin yard config
command shows an invalid configuration file error and plugins don't work properly.
I put more detail here (https://github.com/lsegal/yard/issues/338) when encountered it for the first time
Just to be sure it doesn't depend on Ruby version I tried with 4 of them
ruby-1.8.7-p371 [ i686 ]
ruby-1.9.2-p320 [ x86_64 ]
ruby-1.9.3-p392 [ x86_64 ]
=* ruby-2.0.0-p0 [ x86_64 ]
All the same - configuration error. All the gems are up to date.
Thanks for posting this issue with all the comments. I'll try and take a look at this shortly.
Hey @burtlo,
Have you had chance to look at this issue as of yet? Is there any workaround?
Regards, Jon
I just looked at it now.
The new cucumber/gherkin is causing an error in the configuration because when the plugin is loaded the constant Cucumber::JRUBY
is not defined.
I hacked in something to the lib/yard-cucumber.rb
file which stops the bleeding but let me see if there is another file I simply need to load to make it all work.
module Cucumber
JRUBY = nil
end
I got it! Seems I need to load an additional platform file from Cucumber.
require 'cucumber/platform'
require 'cucumber/parser/gherkin_builder'
require 'gherkin/parser/parser'
require 'gherkin/formatter/tag_count_formatter'
Released 2.3.0 which should work with the version of cucumber you have specified.
Awesome job!! Thanks very much for the quick fix!
Regards, Jon
@luvs @jonathanchrisp Even I'm facing same problem can you please share your Gemfile and Gemfile.lock
After install yard-cucumber YARD stared write error:
yardoc 'features/attach_file/cms_delete_attach_file/cms_delete_attach_file.feature' [error]: Invalid configuration file, using default options. [warn]: Syntax error in
features/attach_file/cms_delete_attach_file/cms_delete_attach_file.feature
:(2,8): syntax error, unexpected ':', expecting end-of-input [warn]: ParserSyntaxError: syntax error infeatures/attach_file/cms_delete_attach_file/cms_delete_attach_file.feature
:(2,8): syntax error, unexpected ':', expecting end-of-input [warn]: Stack trace: /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/ruby/ruby_parser.rb:542:inon_parse_error' /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/ruby/ruby_parser.rb:50:in
parse' /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/ruby/ruby_parser.rb:50:inparse' /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/ruby/ruby_parser.rb:15:in
parse' /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/source_parser.rb:439:inparse' /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/source_parser.rb:44:in
block in parse'Files: 0 Modules: 0 ( 0 undocumented) Classes: 0 ( 0 undocumented) Constants: 0 ( 0 undocumented) Methods: 0 ( 0 undocumented) 0.00% documented
Gem list: bundler (1.3.5) cucumber (1.3.2) diff-lcs (1.2.4) gherkin (2.12.0) io-console (0.4.2) json (1.8.0, 1.7.7) log4r (1.1.10) minitest (5.0.3, 4.3.2) multi_json (1.7.4) nokogiri (1.5.9) parallel (0.6.5) parallel_tests (0.13.3) plugin_manager (1.5) psych (2.0.0) rake (10.0.4, 0.9.6) rdoc (4.0.1, 4.0.0) rspec (2.13.0) rspec-core (2.13.1) rspec-expectations (2.13.0) rspec-mocks (2.13.1) ruby-oci8 (2.1.5) ruby-plsql (0.5.0) rubygems-update (2.0.3) test-unit (2.5.5, 2.0.0.0) thor (0.18.1) yard (0.8.6.1) yard-cucumber (2.2.3) zip (2.0.2)