-
Notifications
You must be signed in to change notification settings - Fork 242
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
TypeError when running guard-rspec second pass #267
Comments
@agross Seems like error occurs in |
|
@agross I did not use |
def _run(all, paths, options)
command = Command.new(paths, options)
STDERR.puts [command, options, paths].inspect
_without_bundler_env { Kernel.system(command) }.tap do |success| Then tell us what output you get. After that, run And you may want to verify the |
First run:
Second run with a modified file:
The funny thing is I can run all guards without problems >1 times. Here's my Guardfile:
I traced it down to the Coveralls gem. As long as I call Do you know how I may detect a Guard environment and disable Coveralls in this case? |
@agross I tried to run |
@agross May be you should report the issue to coveralls community |
@agross Also, please, try to run the next code in Kernel.system "bundle exec rspec -f progress -r C:/Ruby/lib/ruby/gems/2.0.0/gems/guard-rspec-4.2.9/lib/guard/rspec/formatter.rb -f Guard::RSpec::Formatter --failure-exit-code 2 spec/rake/funnel/tasks/msbuild_spec.rb" I think you should see the backtrace of the error |
@907th Many thanks for your support!
|
I'll close the issue, doesn't seem to be related to guard-rspec. |
Actually, I'm not convinced it's simply a coveralls issue - it might be the trigger, but not the cause. It blows my mind that system() could be throwing such an exception, so there's something real fishy going on here... Guard::Rspec::Command inherits from String (see: lib/guard/rspec/command.rb) Could you try changing the Command class:
command = Command.new(paths, options).to_s Doing so may reveal the cause or the exception (which itself simply may not be properly reported). |
@e2 I quickly applied the modifications you suggested. No change in outputs, error messages et al. |
I'm facing the same issue, except i'm not using Coveralls. @agross were you able to do any further troubleshooting on your end? |
@tobmatth Unfortunately not. The if coveralls.will_run part worked for me. |
@tobmatth - you could try a newer version of Ruby (it's worth a shot for multiple reasons). |
@e2 Thanks for your suggestion, unfortunately my project requires Postgres which doesn't seem to be compatible with Ruby 2.1 on Windows yet (I'm on 2.0.0p481 currently). Anyway - i don't think this is a Ruby related issue, as i had guard-rspec already up and running within this project. I will try to dig deeper into this tomorrow... |
@tobmatth - if Kernel.system is failing with a type error (what it seems to be), it very much does seem like a Ruby issue (which would also explain why it works on other platforms). And if that's the case, you should be able to reproduce this in pure ruby. Just to make sure, you could try to change the line mentioned to: command = String.new(Command.new(paths, options).to_s) |
@e2 I'm able to execute the resulting command in irb using Kernel.system without any Exception:
Output:
IRB:
|
I recently upgraded to guard-rspec 4.2.9. When guard-rspec detects a modification on my spec files it tries to run but fails:
It's always failing when run on Windows. The same guard succeeds on Ubuntu. Using rspec 3.0.0.
The text was updated successfully, but these errors were encountered: