rchampourlier / guard-shotgun

Guard gem for Sinatra (shotgun-like)
MIT License
11 stars 9 forks source link

Spoon dependency fails on Windows #11

Open brendon opened 8 years ago

brendon commented 8 years ago

Hi there, I have a developer using our setup on Windows and he's getting the following when trying to run bundle exec guard:

undefined method `attach_function' for Spoon:Module

When I comment out our guard-shotgun configuration everything runs fine:

group :server do
    guard :shotgun do
        watch 'config.ru'
        watch %r{^lib/.+\.rb$}
    end
end

Other people have experienced this failure but not specifically with your gem so I was wondering if you had any pointers or workarounds?

rchampourlier commented 8 years ago

Hi @brendon,

Sorry not to be able to help you... Did you figure it out?

brendon commented 8 years ago

It was related to the Spoon gem. I'm using this fork in the meantime:

https://github.com/agross/spoon

The issue tracking this is: https://github.com/headius/spoon/issues/17 and the PR: https://github.com/headius/spoon/pull/20

Unfortunately @headius hasn't actioned the PR yet.

headius commented 8 years ago

Oops, that's what I get for having too many projects. I'll merge and release.

headius commented 8 years ago

The spoon PR has been merged in and released as spoon 0.0.5.

headius commented 8 years ago

FWIW I released spoon-0.0.6 because the release date didn't get updated for 0.0.5. No other changes.

brendon commented 8 years ago

Thanks @headius :) This is very much appreciated. It certainly can be hard to keep track of all those github notifications hey! :)

brendon commented 8 years ago

@rchampourlier, I'm not using guard-shotgun anymore so can't test this for you specifically but I think if you update the spoon version requirement in your next release then all should be well.

adityaka commented 7 years ago

Still the same problem with spoon 0.06 @headius

C:\...\rubycode>gem list spoon

*** LOCAL GEMS ***

spoon (0.0.6)

C:\....\rubycode>rsense start
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rsense-0.5.18/lib/rsense/client/runner.rb:112:in `start': uninitialized constant Spoon::FileActions (NameError)
Did you mean?  FileUtils
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rsense-0.5.18/bin/rsense:12:in `<top (required)>'
        from C:/Ruby23-x64/bin/rsense:22:in `load'
        from C:/Ruby23-x64/bin/rsense:22:in `<main>'
headius commented 4 years ago

Spoon was never intended to be a cross-platform process-launching library. It literally just wraps posix_spawn, which is not supported on Windows. See for example https://github.com/headius/spoon/issues/21 which lists some alternative libraries that do work across platforms.