[Problem] Rails 3 + RSpec 2 beta 22 with JRuby 1.5.2

Hi,

I created a clean rails 3 project and installed rspec 2 beta 22, created
a simple test case and run all my test using “rake spec”, i get this
error:

D:/ruby/rubies/jruby-1.5.2/bin/jruby.bat -S bundle exec rspec
“./spec/test_spec.rb”
D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1451:in complete': invalid option: --runner (OptionParser::InvalidOption) from D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1449:incatch’
from D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1449:in
complete' from D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1262:inparse_in_order’
from D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1255:in
catch' from D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1255:inparse_in_order’
from D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1249:in
order!' from D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1340:inpermute!’
from D:/ruby/rubies/jruby-1.5.2/lib/ruby/1.8/optparse.rb:1361:in
parse!' from D:/ruby/rubies/jruby-1.5.2/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/option_parser.rb:17:inparse!’
from
D:/ruby/rubies/jruby-1.5.2/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/option_parser.rb:4:in
parse!' from D:/ruby/rubies/jruby-1.5.2/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/configuration_options.rb:59:inparse_env_options’
from
D:/ruby/rubies/jruby-1.5.2/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/configuration_options.rb:48:in
parse_options' from D:/ruby/rubies/jruby-1.5.2/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/runner.rb:22:inrun’
from
D:/ruby/rubies/jruby-1.5.2/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.22/bin/rspec:3
from
D:/ruby/rubies/jruby-1.5.2/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.22/bin/rspec:19:in
`load’
from D:\ruby\rubies\jruby-1.5.2\bin\rspec:19

Any idea why this happens? I found no clues about it searching in
google, yet.

An important clue I just found out, this seams to be a problem with
Netbeans. If I run “jruby -S rake spec” in the command line everything
works OK.
I only get the problem by running this rake task from Netbeans. Maybe
Netbeans uses the “–runner” option in the background and rspec 2.0
doesn’t like it for some reason?

On Sep 20, 2010, at 9:32 AM, Bruno C. wrote:

An important clue I just found out, this seams to be a problem with
Netbeans. If I run “jruby -S rake spec” in the command line everything
works OK.
I only get the problem by running this rake task from Netbeans. Maybe
Netbeans uses the “–runner” option in the background and rspec 2.0
doesn’t like it for some reason?

That would make sense. There is no --runner option in rspec-2. Would you
kindly post this to Issues · rspec/rspec-core · GitHub?

Thx,
David

David C. wrote:

On Sep 20, 2010, at 9:32 AM, Bruno C. wrote:

An important clue I just found out, this seams to be a problem with
Netbeans. If I run “jruby -S rake spec” in the command line everything
works OK.
I only get the problem by running this rake task from Netbeans. Maybe
Netbeans uses the “–runner” option in the background and rspec 2.0
doesn’t like it for some reason?

That would make sense. There is no --runner option in rspec-2. Would you
kindly post this to Issues · rspec/rspec-core · GitHub?

Thx,
David

Done: Netbeans is using "--runner" option when executing 'rake spec' · Issue #150 · rspec/rspec-core · GitHub

In the old version of rspec, this --runner option existed
(http://rspec.info/documentation/tools/spec.html), what was its purpose?