headius/spoon

Windows 7 Issue- undefined method `attach_function' for Spoon:Module (NoMethod Error)

edubkendo opened this issue · 10 comments

@headius I got a report on rsense that appears to be an spoon error:

rsense/rsense#36

Any ideas about it?

I've been messing around with this. I got past the initial spoon error by adding "ffi_lib 'MSVCRT'" above attach_function :_spawnve.

MSVCRT is the dll where those functions are defined.

It looks like the way spoon handles windows is very different from a unix.
rsense still try uses the methods a unix spoon would have but windows option doesn't

Has anyone found a fix yet? I want to use RSense with Atom but it's impossible without this.

@sanekfta, it looks like @agross might have a fix for that. Thanks for bumping this issue. Why don't you give it a try on your local and see if it works. I'll do the same when i get to it 😁

@jonyeezs @sanekfta If one of you can verify @agross's PR I'd be happy to merge it and get a release out!

@headius Doesn't seem to work for me. But the error message has changed, now it looks like this:
C:/Ruby22/lib/ruby/gems/2.2.0/gems/rsense-0.5.18/lib/rsense/client/runner.rb:112:in start': uninitialized constant Spoon::FileActions (NameError) from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rsense-0.5.18/bin/rsense:12:in<top (required)>'
from C:/Ruby22/bin/rsense:23:in load' from C:/Ruby22/bin/rsense:23:in

'

@sanekfta rsense is using an API that's only available in the Unix version of Spoon, it appears. There's no Spoon::FileActions in the Windows version, but it may be possible to add?

Fixed in 0.0.5. Sorry for the epic delay on this one.

@headius Sorry to say the FFI fix from @agross didn't resolve this issue on Windows.

No fix yet, but this issue has been closed? Seriously?