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

Can't convert Hash into String when starting spork via Guard #54

Closed
derekprior opened this issue Dec 9, 2011 · 7 comments
Closed

Can't convert Hash into String when starting spork via Guard #54

derekprior opened this issue Dec 9, 2011 · 7 comments

Comments

@derekprior
Copy link

I've started getting the error in the title when starting guard-spork. I can start spork directly and my other guards seem to run fine. I've reduced my Guardfile to:

guard 'spork' do
end

And still get the following stack trace when starting up:


...lib/guard/spork/spork_instance.rb:28:in `exec': can't convert Hash into String (TypeError)
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-spork-0.4.0/lib/guard/spork/spork_instance.rb:28:in `start'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-spork-0.4.0/lib/guard/spork/spork_instance.rb:27:in `fork'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-spork-0.4.0/lib/guard/spork/spork_instance.rb:27:in `start'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard/dsl.rb:117:in `to_proc'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-spork-0.4.0/lib/guard/spork/runner.rb:25:in `each'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-spork-0.4.0/lib/guard/spork/runner.rb:25:in `launch_sporks'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-spork-0.4.0/lib/guard/spork.rb:23:in `start'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:322:in `send'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:322:in `run_supervised_task'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:320:in `catch'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:320:in `run_supervised_task'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:153:in `start'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:254:in `run_on_guards'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:253:in `each'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:253:in `run_on_guards'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:252:in `catch'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:252:in `run_on_guards'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:251:in `each'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:251:in `run_on_guards'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard.rb:152:in `start'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/lib/guard/cli.rb:68:in `start'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/gems/guard-0.8.8/bin/guard:6
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/bin/guard:19:in `load'
    from /Users/dprior/code/p4/sand/vendor/bundle/ruby/1.8/bin/guard:19

It's possible I'm doing something silly, but this was previously working.

@derekprior
Copy link
Author

Rolling back to 0.3.2 fixed the issue. I suspect that this commit introduced the issue.

@thibaudgg
Copy link
Member

@Mange do you have any idea from where it comes?

@derekprior
Copy link
Author

FWIW, I ran into this on REE 1.8.7, but I don't see any 1.9 specific
code in the commit, so I don't think that's it.

On Fri, Dec 9, 2011 at 2:46 PM, Thibaud Guillaume-Gentil
reply@reply.github.com
wrote:

@Mange do you have any idea from where it comes?


Reply to this email directly or view it on GitHub:
#54 (comment)

@Mange
Copy link
Contributor

Mange commented Dec 10, 2011

Seems like I'm not calling env_exec in the fork, but instead calling the 1.9-specific version of exec. How it happened, I don't know. I was sure of specing this correctly.

@Mange
Copy link
Contributor

Mange commented Dec 10, 2011

Ah, I was abscent-minded and didn't follow through with a method renaming I was doing. The method was originally called exec, but I decided to rename it to env_exec to make stuff clearer. I forgot to change all the places where the method was called.

@thibaudgg
Copy link
Member

Ok, can you please submit a little pull request to fix that? Thanks @Mange!

thibaudgg added a commit that referenced this issue Dec 12, 2011
Fix issue #54 by calling correct exec method
@thibaudgg
Copy link
Member

Should be fixed now, thanks @Mange for your kick pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants