Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cucumber 1.2.4 - `block in process_args': invalid option: --tags (OptionParser::InvalidOption) #423

Closed
devram79 opened this issue Apr 8, 2013 · 11 comments
Milestone

Comments

@devram79
Copy link

devram79 commented Apr 8, 2013

Cucumber - 1.2.4
Gherkin - 2.11.7
Ruby - 1.9.2

Running a feature with the "--tags" or "-t" option the error with "minitest" appears even after the feature passes without any errors.

Minitest is not installed as a separate gem and no where ruby's self installed minitest is being used.

I have tried with both "--tags" & "-t" options

08-Apr-2013 09:51:04 2 scenarios (2 passed)
08-Apr-2013 09:51:04 7 steps (7 passed)
08-Apr-2013 09:51:04 1m20.961s

08-Apr-2013 09:51:07 /home/bamboo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/minitest/unit.rb:581:in block in process_args': invalid option: --tags (OptionParser::InvalidOption) 08-Apr-2013 09:51:07 from /home/bamboo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/minitest/unit.rb:560:innew'
08-Apr-2013 09:51:07 from /home/bamboo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/minitest/unit.rb:560:in process_args' 08-Apr-2013 09:51:07 from /home/bamboo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/minitest/unit.rb:591:inrun'
08-Apr-2013 09:51:07 from /home/bamboo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/minitest/unit.rb:508:in `block in autorun'

Reverting to 1.2.3 and Gherkin 2.11.6 works no issues

@mattwynne
Copy link
Member

It looks as if you're using Ruby 1.9.2.

We don't support Ruby 1.9.2, only Ruby 1.9.3 in the 1.9.x series.

Please can you confirm this issue persists with Ruby 1.9.3?

@devram79
Copy link
Author

devram79 commented Apr 8, 2013

My CI environment has been on 1.9.2 for almost a year now and I didn't have
this problem with cucumber 1.2.3. It started only since the bundle update
to 1.2.4.

My local machine runs on 1.9.3 and i cant replicate the problem.
Unfortunately I can't upgrade my CI to 1.9.3 because there are other
dependencies which require it to be at that ruby level.

Dave

On Apr 8, 2013 7:37 PM, "Matt Wynne" [email protected] wrote:

It looks as if you're using Ruby 1.9.2.

We don't support Ruby 1.9.2, only Ruby 1.9.3 in the 1.9.x series.

Please can you confirm this issue persists with Ruby 1.9.3?


Reply to this email directly or view it on GitHub.

@mattwynne
Copy link
Member

#404 will have caused this. I'm sorry for your pain @devram79 but you must understand that we need to focus on the most recent versions of Ruby otherwise we'd spend forever worrying about backwards compatibility rather than moving the project forwards.

We actually removed 1.9.2 from our test runs a few releases ago, but this must be the first change we've made that's caused a problem.

@os97673 I think maybe we should continue to support Ruby 1.9.2 until at least version 1.3, what do you think?

@os97673
Copy link
Member

os97673 commented Apr 8, 2013

I do not think we should support 1.9.2. Especially there is a simple workaround - add newer minitest to Gemfile.
So, let's close the ticket.

@mattwynne
Copy link
Member

@devram79
Copy link
Author

devram79 commented Apr 9, 2013

On Mon, Apr 8, 2013 at 8:55 PM, Matt Wynne [email protected] wrote:

OK @os97673 https://github.com/os97673. @devram79https://github.com/devram79you have two workarounds:

  1. Use the latest minitest gem
  2. Use this patch code (lines 2-21):

https://github.com/cucumber/cucumber/blob/693c532fc5d104c1879ac1171ce0d13b26824685/lib/cucumber/core_ext/disable_mini_and_test_unit_autorun.rb#L2

Thanks. But this is really weird since you yanked 1.2.4 and released 1.2.5,
my CI env got the latest 1.2.5 this morning. Since then, I am not seeing
the error with the "tags" related to minitest. Also to mention I am still
on Ruby 1.9.2 and not installed minitest either. I was going to do all that
this morning but to my surprise its all working as expected.

So what has changed/not changed..??

Dave


Reply to this email directly or view it on GitHubhttps://github.com/cucumber/common/issues/423#issuecomment-16044158
.

@os97673
Copy link
Member

os97673 commented Apr 9, 2013

Thanks. But this is really weird since you yanked 1.2.4 and released 1.2.5,
my CI env got the latest 1.2.5 this morning. Since then, I am not seeing
the error with the "tags" related to minitest. Also to mention I am still
on Ruby 1.9.2 and not installed minitest either. I was going to do all that
this morning but to my surprise its all working as expected.

So what has changed/not changed..??

1.2.5 is 1.2.3 + one fix, 1.2.4 contains number of changes including the one which causes your problem. And one of those change affects API which we consider private but others uses as public, thus we have reverted ALL changes and 1.2.5 is based on 1.2.3.

@mattwynne
Copy link
Member

@devram79 you'll need to do this, most likely when we ship version 1.3.

@devram79
Copy link
Author

devram79 commented Apr 9, 2013

Hi, yes I am planning on doing this in a couple of days that is upgrade my
CI to 1.9.3.

On Apr 9, 2013 9:49 PM, "Matt Wynne" [email protected] wrote:

@devram79 you'll need to do this, most likely when we ship version 1.3.


Reply to this email directly or view it on GitHub.

@colszowka
Copy link

I bumped into the same issue it seems. On a Rails 4 app with latest cucumber (1.3.6) and cucumber-rails (1.4.0), when running bundle exec cucumber with any options (i.e. --format html), the suite runs but I get a failure at the end by this exception: ~/.gem/ruby/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:1037:in 'block in process_args': invalid option: --format (OptionParser::InvalidOption)

This is on Ruby 2.0.0-p247. I tried adding and updating the minitest gem explicitly to my gemfile, but as it already is a dependency of active support it is at the highest available version with activesupport 4.0.0.

(Edit, just saw there are additional, still-open issues on the same problem over at cucumber-rails: cucumber/cucumber-rails#252 and cucumber/cucumber-rails#253)

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
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