You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So
I managed to get the rspec plugin to work on my uniq vagrant environment (unorthodox directory structure)
But my output when i run the vagrant rspec win command is returning an error:
At first i was thinking maybe i ndeed rspec on the remote VM , and tried installing it there , and passing in vagrantfiole:
config.rspec.rspec_bin_path = "C/Ruby23/bin/rspec"
But that did not worked
i tried running that rspec and got:
C:\DevOps_31.03.16>c:\Vagrant\gems\gems\rspec-core-3.4.4\exe\rspec
'c:\Vagrant\gems\gems\rspec-core-3.4.4\exe\rspec' is not recognized as an internal or external command,operable program or batch file.
And indeed that rspec is not an executable
So i tried pointing rspec_bin_path to my local ruby installation of rspec gem
Got the same error again
I tried to run the command directly on command line and got :
C:\DevOps_31.03.16>C:\Ruby22-x64\bin\rspec --require C:\Vagrant\gems\gems\ci_reporter_rspec-1.0.0\lib\ci\reporter\rake\rspec_loader.rb --format CI::Reporter::RSpecFormatter -o /dev/null -I combined/s
pec_ext -I spec spec/run_test2_ext_spec.rb
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- ci/reporter/core (LoadError) from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire'
from C:/Vagrant/gems/gems/ci_reporter_rspec-1.0.0/lib/ci/reporter/rspec.rb:1:in <top (required)>' from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' from C:/Vagrant/gems/gems/ci_reporter_rspec-1.0.0/lib/ci/reporter/rake/rspec_loader.rb:2:in<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in block in requires=' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:ineach'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in requires=' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:109:inblock in process_options_into'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:108:in each' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:108:inprocess_options_into'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:21:in configure' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:105:insetup'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:inrun' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:inrun'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:ininvoke' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/exe/rspec:4:in<top (required)>'
from C:/Ruby22-x64/bin/rspec:23:in load' from C:/Ruby22-x64/bin/rspec:23:in
'
This i assume comes from spec_helper.rb
So i need more info on what is the minimum requirement to make this plugin work
Any help will be appreciated (including telling me how noob i am :) )
The text was updated successfully, but these errors were encountered:
First think to note: Vagrant has its own private gem store, under C:/Vagrant/gems/gems . When you run vagrant rspec (or any other vagrant command) the gem search path has been modified to only look in Vagrant's store. So, when you run it "bare" on the command line, you either need to tell ruby to look in Vagrant's gem locations, or it will try to look in the system ruby, and not find it (as happened to you).
That doesn't explain why you're getting exit code 127, though. I'm leery of the '-o /dev/null' option - that is probably UNIX-specific, and I don't do any development on Windows. It may have nothing to do with that, though.
Your instincts are correct, to try to run the command. Just need to get the right gem path. @jblancett, anything to add?
@clintoncwolfe I think you're dead on. At least when you're running rspec manually, the context rspec is running in isn't finding the ci_reporter_rspec gem because it's only in the vagrant plugin load path. Does running the command manually return the same 127 exit code? I don't even know how to check that on windows. It's likely you're seeing a different error when you run it manually than when it gets run by vagrant. To run manually I'd try installing vagrant-rspec-ci as a system gem which will pull the ci_reporter_rspec dependency. At that point you should get the same results as when run by vagrant
So
I managed to get the rspec plugin to work on my uniq vagrant environment (unorthodox directory structure)
But my output when i run the vagrant rspec win command is returning an error:
==> win: Running rspec test: spec/run_test2_ext_spec.rb
==> win: Unrecognized exit code from rspec: 127
==> win: for:C:/Vagrant/gems/gems/rspec-core-3.4.4/exe/rspec --require C:/Vagrant/gems/gems/ci_reporter_rspec-1.0.0/lib/ci/reporter/rake/rspec_loader.rb --format CI::Reporter::RSpecFormatter -o /dev/null -I combined/spec_ext -I spec spec/run_test2_ext_spec.rb
Deploy ended ok.
At first i was thinking maybe i ndeed rspec on the remote VM , and tried installing it there , and passing in vagrantfiole:
config.rspec.rspec_bin_path = "C/Ruby23/bin/rspec"
But that did not worked
i tried running that rspec and got:
C:\DevOps_31.03.16>c:\Vagrant\gems\gems\rspec-core-3.4.4\exe\rspec
'c:\Vagrant\gems\gems\rspec-core-3.4.4\exe\rspec' is not recognized as an internal or external command,operable program or batch file.
And indeed that rspec is not an executable
So i tried pointing rspec_bin_path to my local ruby installation of rspec gem
Got the same error again
==> win: Running rspec test: spec/run_test2_ext_spec.rb
==> win: Unrecognized exit code from rspec: 127
==> win: for:C/Ruby22-x64/bin/rspec --require C:/Vagrant/gems/gems/ci_reporter_rspec-1.0.0/lib/ci/reporter/rake/rspec_loader.rb --format CI::Reporter::RSpecFormatter -o /dev/null -I combined/spec_ext -I spec spec/run_test2_ext_spec.rb
I tried to run the command directly on command line and got :
C:\DevOps_31.03.16>C:\Ruby22-x64\bin\rspec --require C:\Vagrant\gems\gems\ci_reporter_rspec-1.0.0\lib\ci\reporter\rake\rspec_loader.rb --format CI::Reporter::RSpecFormatter -o /dev/null -I combined/s
'pec_ext -I spec spec/run_test2_ext_spec.rb
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require': cannot load such file -- ci/reporter/core (LoadError) from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require'from C:/Vagrant/gems/gems/ci_reporter_rspec-1.0.0/lib/ci/reporter/rspec.rb:1:in
<top (required)>' from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require'from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require' from C:/Vagrant/gems/gems/ci_reporter_rspec-1.0.0/lib/ci/reporter/rake/rspec_loader.rb:2:in
<top (required)>'from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require' from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require'from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in
block in requires=' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in
each'from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in
requires=' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:109:in
block in process_options_into'from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:108:in
each' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:108:in
process_options_into'from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:21:in
configure' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:105:in
setup'from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in
run' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in
run'from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in
invoke' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.4/exe/rspec:4:in
<top (required)>'from C:/Ruby22-x64/bin/rspec:23:in
load' from C:/Ruby22-x64/bin/rspec:23:in
This i assume comes from spec_helper.rb
So i need more info on what is the minimum requirement to make this plugin work
Any help will be appreciated (including telling me how noob i am :) )
The text was updated successfully, but these errors were encountered: